Part Number Hot Search : 
25Q064 BSX52A MIC2505 SFA1003G 40CPQ80G DE910 DZ23C39 PD54003
Product Description
Full Text Search
 

To Download BMA222 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  BMA222 data sheet bosch sensortec rev. 1.1 5 page 1 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. bma 222 d ata sheet ordering code please contact your bosch sensortec representative for the ordering code package type 12 - pin lga d ocument revision 1. 1 5 document release date 31 may 201 2 document number bst - bma 2 22 - ds00 2 - 0 5 technical reference code(s) 0 273 141 12 0 notes data in this document are subject to change without notice. product photos and pictures are for illustration purposes only and may differ from the real product?s appearance. not intended for publishing. bosch sensortec BMA222 digital, triaxial acceleration sensor d ata sheet
BMA222 data sheet bosch sensortec rev. 1.1 5 page 2 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. BMA222 digital, t riaxial ? 2g to ? 16g acceleration sensor with intelligent on - chip motion - triggered interrupt controller key features ? ultra - small package lga packag e ( 12 pins ), footprint 2mm x 2mm, he ight 0.95 mm ? digital interface spi (4 - wire, 3 - wire), i2c, 2 interrupt pin s v ddio voltage range: 1. 2 v to 3.6v ? programmable functionality a cceleration ranges 2g/4g/8g/16g low - pass filter bandwidth s 1khz - <8 hz ? on - chip interrupt controller m oti on - triggered interrupt - signal generation for - new data - any - motion (slope) detection - tap sensing (single tap / double tap) - orientation recognition - flat detection - low - g/high - g detection s tand - alone capability (no microcontroller needed) ? ul tra - low power asic l ow current consumption, short wake - up time, a dvanced features for system power management ? rohs compliant, halogen - free typical applications ? display profile switching ? menu scrolling, t ap / double tap sensing ? gaming ? p edometer / step counting ? free - fall detection ? e - compass tilt compensation ? drop detection for warranty logging ? advanced system power management for mobile applications general description the BMA222 is a triaxial, low - g acceleration sensor with di gital output for consumer market applications. it allows measurements of acceleration in three perpendicular axes. an evaluation circuitry (asic) converts the output of a micromechanical acceleration - sensing structure (mems) that works according to the dif ferential capacitance principle.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 3 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. package and interface s of the bma 222 have been defined to match a multitude of hardware requirements. since the sensor features an ultra - small footprint and a flat package it is ingeniously suited for mobile applications. the bma 222 offers a variable v ddio voltage range from 1.2 v to 3.6v and can be programmed to optimize functionality, performance and power consumption in customer specific applications. in addition it features an on - chip interrupt controller enabling mot ion - based applications without use of a microcontroller. the bma 222 senses tilt, motion and shock vibration in cell phones, handhelds, computer peripherals, man - machine interfaces, virtual reality features and game controllers.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 4 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. index of contents 1. specification ................................ ................................ ................................ ................................ ....... 7 2. absolute maximum ratings ................................ ................................ ................................ ........... 9 3. block diagram ................................ ................................ ................................ ................................ .. 10 4. functional descri ption ................................ ................................ ................................ ................ 10 4.1 p ower management ................................ ................................ ................................ .......................... 10 4.2 o perational modes ................................ ................................ ................................ .......................... 11 4.2.1 general mode ................................ ................................ ................................ .............................. 12 4.2.2 dedicated mode (c - less or stand - alone mode) ................................ ................................ ........ 12 4.3 p ower modes ................................ ................................ ................................ ................................ ..... 14 4.4 s ensor data ................................ ................................ ................................ ................................ ...... 16 4.4.1 acceleration data ................................ ................................ ................................ ........................ 16 4.4.2 temperature data ................................ ................................ ................................ ........................ 17 4.5 s elf - test ................................ ................................ ................................ ................................ .......... 18 4.6 o ffset compensation ................................ ................................ ................................ ...................... 18 4.6.1 slow compensation ................................ ................................ ................................ .................... 20 4.6.2 fast compensation ................................ ................................ ................................ ..................... 20 4.6.3 manual compensation ................................ ................................ ................................ ................. 21 4.6.4 inline calibration ................................ ................................ ................................ ........................... 21 4 .7 n on - volatile memory ................................ ................................ ................................ ...................... 22 4.8 i nterrupt controller ................................ ................................ ................................ ..................... 22 4.8.1 general features ................................ ................................ ................................ .......................... 22 4.8.2 mapping (inttype to int pin#) ................................ ................................ ................................ ...... 24 4.8.3 electrical behaviour (int pin# to open - drive or push - pull) ................................ ........................... 24 4.8.4 new data interrupt ................................ ................................ ................................ ....................... 24 4.8.5 any - motion (slope) detection ................................ ................................ ................................ ....... 25 4.8.5.1 enabling (disabling) for each axis ................................ ................................ ............................ 26 4.8.5.2 axis and sign information of any motion interrupt ................................ ................................ .... 26 4.8.5.3 serial interface and dedicated wake - up mode ................................ ................................ ........ 26 4.8.6 tap sensing ................................ ................................ ................................ ................................ 26 4. 8.6.1 single tap detection ................................ ................................ ................................ .................. 27 4.8.6.2 double tap detection ................................ ................................ ................................ ................ 27 4.8.6.3 selecting the timing of tap detection ................................ ................................ ......................... 28 4.8.6.4 axis and sign information of tap sensing ................................ ................................ .................. 28 4.8.6.5 tap sensing in low power mode ................................ ................................ ............................... 28 4.8.7 orientation recognition ................................ ................................ ................................ ................. 29 4.8.7.1 orientation blocking ................................ ................................ ................................ .................. 31 4.8.8 flat detection ................................ ................................ ................................ ............................... 32 4.8.9 low - g interrupt ................................ ................................ ................................ ............................. 33 4.8.10 high - g interrupt ................................ ................................ ................................ .......................... 34 4.8.10.1 axis and sign information of high - g interrupt ................................ ................................ ........... 34
BMA222 data sheet bosch sensortec rev. 1.1 5 page 5 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 5. register descript ion ................................ ................................ ................................ ..................... 35 5.1 g eneral remarks ................................ ................................ ................................ ............................. 35 5.2 r egister map ................................ ................................ ................................ ................................ ..... 36 5.3 c hip id ................................ ................................ ................................ ................................ ................ 37 5.4 a cceleration data ................................ ................................ ................................ ........................... 37 5.5 t emperature data ................................ ................................ ................................ ............................ 39 5.6 s tatus registers ................................ ................................ ................................ .............................. 39 5.7 g - range selection ................................ ................................ ................................ ............................ 41 5.8 b andwidths ................................ ................................ ................................ ................................ ....... 41 5.9 p ower modes ................................ ................................ ................................ ................................ ..... 41 5.10 s pecial control setti n gs ................................ ................................ ................................ ............. 42 5.11 i nterrupt settings ................................ ................................ ................................ ........................ 42 5.12 s elf - test ................................ ................................ ................................ ................................ ......... 49 5.13 n on - volatile memory cont rol (eeprom control ) ................................ ................................ .... 49 5.14 i nterface configurati on ................................ ................................ ................................ ............... 50 5.15 o ffset compensation ................................ ................................ ................................ ..................... 51 6. digital interface s ................................ ................................ ................................ .......................... 54 6.1 s erial peripheral int erface (spi) ................................ ................................ ................................ .. 55 6.2 i nter - i ntegrated c ircuit (i2c) ................................ ................................ ................................ ......... 58 7. pin - out and connection d iagram ................................ ................................ ............................. 62 7.1 p in - out ................................ ................................ ................................ ................................ .............. 62 7.2 c onnection diagram 4 - wire spi ................................ ................................ ................................ ....... 63 7.3 c onnection diagram 3 - wire spi ................................ ................................ ................................ ....... 64 7.4 c onnection diagram i 2 c ................................ ................................ ................................ ................... 65 8. package ................................ ................................ ................................ ................................ ............... 66 8.1 o utline dimensions ................................ ................................ ................................ ........................... 66 8.2 s ensing axes orientat ion ................................ ................................ ................................ ................ 67 8.3 l anding patter n recommendation ................................ ................................ ................................ . 68 8.4 m arking ................................ ................................ ................................ ................................ ............. 69 8.4.1 mass production samples ................................ ................................ ................................ ........... 69 8.4.2 engineering samples ................................ ................................ ................................ .................. 69 8.5 s oldering guidelines ................................ ................................ ................................ ....................... 70 8.6 h andling instructions ................................ ................................ ................................ ..................... 71 8.7 t ape and reel specifi cation ................................ ................................ ................................ ............ 71 8.7.1 orientation within the reel ................................ ................................ ................................ ............ 72
BMA222 data sheet bosch sensortec rev. 1.1 5 page 6 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 8.8 e nvironmental safety ................................ ................................ ................................ .................... 72 8.8.1 halogen content ................................ ................................ ................................ .......................... 72 8.8.2 internal package structure ................................ ................................ ................................ ........... 72 9. legal disclaimer ................................ ................................ ................................ ............................. 73 9.1 e ngineering samples ................................ ................................ ................................ ........................ 73 9.2 p roduct u se ................................ ................................ ................................ ................................ ...... 73 9.3 a pplication examples and hints ................................ ................................ ................................ ...... 73 10. document history and modification ................................ ................................ ..................... 74
BMA222 data sheet bosch sensortec rev. 1.1 5 page 7 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 1. specification if not stated otherwise, the given values are over lifetime an d full performance temperature and voltage ranges , minimum/ maximum values are 3 ? . table 1 : parameter specification o perating c onditions parameter symbol condition min typ max units acceleration range g fs2g selectable via serial digital interface 2 g g fs4g 4 g g fs8g 8 g g fs16g 16 g supply voltage internal domains v dd 1.62 2.4 3.6 v supply voltage i/o domain v ddio 1.2 2.4 3.6 v voltage input low level v il spi & i2c 0.3 v ddio - voltage input high level v ih spi & i2c 0.7v d dio - voltage output low level v ol v ddio = 1.62v i ol = 3ma, spi & i2c 0.2v ddio - v ddio = 1.2v i ol = 3ma, spi & i2c 0.23 v ddio - voltage output high level v oh v ddio = 1.62v i ol = 2ma , spi & i2c 0.8v ddio - v ddio = 1.2v i ol = 2ma , spi & i2c 0. 62 v ddio - supply current in normal mode i dd nominal v dd supplies t a =25c, bw = 1khz 1 3 9 a supply current in low - power mode i ddlp nominal v dd supplies t a =25c, bw = 1khz sleep duration 25ms 7 a supply current in suspend mode i ddsm nominal v dd supplies t a =25c 0.5 a wake - up time t w_up from low - power mode or suspend mode, bw = 1khz 0.8 ms start - up time t s_up por, bw = 1khz 2 ms operating temperature t a - 40 +85 c
BMA222 data sheet bosch sensortec rev. 1.1 5 page 8 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. o utput s igna l parameter symbol condition min typ max units d evice resolution d res g fs2g 15.6 mg sensitivity s 2g g fs2g , t a =25c 64 lsb/g s 4g g fs4g , t a =25c 32 lsb/g s 8g g fs8g , t a =25c 16 lsb/g s 16g g fs16g , t a =25c 8 lsb/g sensitivity temperature drift tcs g fs2g , - 40c t a +85c nominal v dd supplies 0.02 %/k zero - g offset off g fs2g , t a =25c nominal v dd supplies 10 0 mg zero - g offset temperature drift tco g fs2g , - 40c t a +85c nominal v dd supplies 1 mg/k bandwidth bw 8 1 st order filter, selectable via serial digital interface 8 hz bw 16 16 hz bw 31 31 hz bw 63 63 hz bw 125 125 hz bw 250 250 hz bw 500 500 hz bw 1000 1000 hz nonlinearity nl best fit straight line 1 % fs output noise n rms g fs2g , t a =25c nominal v dd supplies normal mode 1 mg/ ? hz power supply rejection rate psrr t a =25c nominal v dd supplies 20 mg/v temperature sensor measurement range t s t a =25c nominal v dd supplies - 40 +87.5 c temperature s ensor slope dt s t a =25c nominal v dd supplies 0.5 lsb/k temperature sensor offset ot s t a =25c nominal v dd supplies 5 k m echanical c haracteristics parameter symbol condition min typ max units cross axis sensitivity s relative contribution between any two of the three axes 1 % alignment error e a relative to package outline 0.5
BMA222 data sheet bosch sensortec rev. 1.1 5 page 9 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 2. absolute m aximum r atings table 2 : absolute m aximum r atings parameter condition min max units voltage at supply pin v dd pin - 0.3 4.25 v v ddio pin - 0.3 4.25 v voltage at any logic p ad non - s upply p in - 0.3 v ddio +0.3 v passive storage temp . range 65% rel. h . - 50 +150 c mechanical shock duration 200s 10,000 g duration 1 .0ms 2,000 g free fall onto hard surfaces 1.8 m esd hbm, at any pin 2 kv cdm 500 v
BMA222 data sheet bosch sensortec rev. 1.1 5 page 10 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 3. block d iagram figure 1 shows the basic building blocks of the bma 222 : figure 1 : block d iagram of bma 222 4. functional d escription note: default values for registers can be found in chapter 5. 4.1 p ower m anagement the bma 222 has two distinct power supply pins: ? v dd is the main power supply for all internal analog and digital functional blocks; ? v ddio is a separate power supply pin, exclusively used for the supply of the digital interface. there ar e no limitations on the voltage levels of both pins relative to each other, as long as each of them lies within its operating range. furthermore, the device can be completely switched off ( v dd = 0v) while keeping the v ddio supply on ( v ddio > 0v). t o switch off the interface supply ( v ddio = 0v) and keep the internal supply on ( v dd > 0v) is safe only in normal mode. if the device is in low - power mode or suspend mode while v ddio = 0v, there is a risk of excess current consumption on the v dd supply (non - destruc tive). it is absolutely prohibited to keep any interface at a logical high level when v ddio is switched off. such a configuration wil l permanently damage the device (i.e. if v ddio = 0 ? [sdi & sdo & sck & csb] high). the device contains a p ower - on rese t (por) generator. it resets the logic part and the register values a fter power ing - on v dd and v dd io . there is no limitation on the sequence of switching on x y z m u x g a i n & o f f s e t l o g i c v r e f c / u a d c r e g u l a t o r i n t e r f a c e n v m o s c v d d g n d v d d i o p s i n t 2 i n t 1 s d i s d o s c k c s b m e m s a s i c
BMA222 data sheet bosch sensortec rev. 1.1 5 page 11 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. both supply voltages. in case the i2c interface shall be used, a direct electrical connection betwee n v dd io supply and the ps pin is needed in order to ensure reliable protocol selection (see section 4.2 operational modes ). 4.2 operational m odes depending on the configuration the bma 222 is able to operate in two different operation al modes: ? general mod e: the device is acting as a slave on a digital interface (spi or i2c ) and is controlled by the ex t ernal bus master (e.g. c). the master gets measurement data and status information from the device through the digital interface. in particular, the master can configure the interrupt controller and read out the interrupt status registers. moreover, it can freely configure and use the two interrupt pins (int1, int2). several interrupts may be enabl ed in parallel. ? dedicated mode: the dedicated mode allows the sensor to be operated as a stand - alone device in a simple c - less system without abandon of the interrupt functionality . n o digital interface is needed and, as a consequence, no measurement data can be read from the device. instead of the digital interfac e the i nternal interrupt engine with its default setting is used. t he interrupt status is mapped onto dedicated output pins. one out of three different sub - modes can be chosen : a) orientation recognition, b) tap sensing or c ) slope (any - motion) detection . o nly one interrupt at a time can be assigned. the selection of the operation al mode is done during start - up or reset by the state of the ps pin. if ps is floating, the dedicated mode is selected. a defined digital state selects the general mode. all pads are in input mode (no output driver active) during the start - up sequence until the operational mode and, in case of the general mode, the interface type is selected. the start - up sequence is run after power - up and after reset. figure 2 illustrates the sel ection of the different operational mode s : figure 2 : operational m ode s election r e s e t y e s n o p s f l o a t i n g ? g e n e r a l m o d e d e d i c a t e d m o d e c h e c k c o n f i g u r a t i o n p i n s t a b l e 4 & t a b l e 5 p s = 0 ? g e n e r a l m o d e w i t h i 2 c g e n e r a l m o d e w i t h s p i o n e o r m o r e i n t e r r u p t s c a n b e c o n f i g u r e d v i a i 2 c o n e o r m o r e i n t e r r u p t s c a n b e c o n f i g u r e d v i a s p i s u b - m o d e b t a p s e n s . s u b - m o d e a o r i e n t a t i o n s e n s . s u b - m o d e c s l o p e s e n s . t a p s e n s i n g i n t e r r u p t i s e n a b l e d o r i e n t a t i o n i n t e r r u p t i s e n a b l e d a n y - m o t i o n i n t e r r u p t i s e n a b l e d y e s n o
BMA222 data sheet bosch sensortec rev. 1.1 5 page 12 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 4.2.1 general m ode a defined digital state at the ps pin selects the general mode. its polarity determines the kind of interface to be used : ? ps = gnd enables the digital spi interface ? ps = v ddio enables the digital i2c interface ? ps = float enables the dedicated mode 4.2.2 dedicated m ode (c - less or s tand - a lone m ode) the dedicated mode operates with pre - defined settings of the interrupt engi ne in order to generate the motion - triggered interrupt - signals , i .e. b andwidth, sleep time, low - power mode, threshold , and hysteresis are use case optimized. nevertheless some minor configurations can be selected by the user. the dedicated mode is entered if the device is connected according to table 3 . during the start - up / power on sequence the ps pin (#11) must float. table 3 : entering and o perating d edicated m od e vddio pin#3 nc pin#4 vdd pin#7 gnd io pin#8 gnd pin#9 ps pin#11 v ddio nc v dd gnd gnd float depending on the configuration of the other device pins according to table 4 the corresponding sub - mode of the dedicated mode is entered. in table 4 and table 5 the unshaded entries represent necessary input values for the corresponding sub - mode selecti on while the shaded entries represent corresponding output parameters of the events to be detected . table 4 : sub - m ode s election and specific o utput s of the d edicated m ode sub - mode sdo pin#1 sdx pin#2 int1 pin#5 int2 pin#6 csb pin#10 scx pin#12 orientati on out put orient1 - detect o ut put orient0 - detect o ut put orient2 - detect o ut put flat - detect select orient sleep gnd tap o ut put double - detect o ut put single - detect gnd s elect tap type select tap sleep v dd slope gnd o ut put motion - detect v dd gnd select slope sle ep v dd table 5 contains state and description details of the parameters introduced in table 4. u nshaded entries represent input values to be set, shaded entries represent output parameters to be detected.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 13 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. table 5 : description of the p arameters of t ab le 4 sub - mode parameter see table 4 state description orientation bw = 62.5 hz output orient0 - detect l ow upright for portrait / left for landscape h igh upside - down for portrait / right for landscape output orient1 - detect low portrait high landscape output orient2 - detect low z - axis upward looking i.e. | ? | < 90 (fig. 8) high z - axis downward looking i.e. | ? | > 90 (fig. 8) output flat - detect low non flat i.e. | ? | > 19,5 (fig. 8) high flat i.e. | ? | < 19,5 (fig. 8) select ori ent sleep gnd low - power mode enabled, sleep time = 100ms v dd low - power mode enabled, sleep time = 1s tap bw = 1k hz output double - detect low currently no double - tap event high double - tap event detected output single - detect low currently no single - tap event high single - tap event detected select tap type gnd single - t ap detection enabled v dd double - t ap detection enabled select tap sleep gnd low - power m ode disabled v dd low - power m ode enabled, sleep time = 10ms slope bw = 125 hz output m otion - detect low currently no any - motion event high any - motion event detected select slope sleep gnd low - power mode enabled, sleep time = 50ms v dd low - power mode enabled, sleep time = 1s low = gnd, high = v ddio for more details, refer to chapt er 4.3 power modes and 4.8 interrupt controller ? orientation recognition sub mode ? refer to chapter 4.8.7 ? tap sensing sub mode ? refer to chapter 4.8.6 ? any - motion (s lope ) detection) sub mode ? refer to chapter 4.8.5
BMA222 data sheet bosch sensortec rev. 1.1 5 page 14 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 4.3 power m odes the bma 222 has three different power modes. besides normal mode, which represents the fully operational state of the device, there are two special energy saving modes: low - power mode and suspend mode. the possible transitions between the power modes are illustrated in f igure 3 : figure 3 : power m ode t ransition d iagram in normal mode, all parts of the electronic circuit are held powered - up and data acquisi tion is performed continuously. in contrast to this, in suspend mode the whole analog part, oscillators included, is powered down. no data acquisition is performed, the only supported operations are reading registers (latest acceleration data are kept) and writing to the (0x11) suspend bit or (0x1 4) s oftreset register . suspend mod e is enter ed (left) by writing 1 (0) to the (0x11) suspend bit . in low - power mode, the device is periodically switching between a sleep phase and a wake - up phase . the wake - up phase essentially corresponds to operation in normal mode with complete power - up of t he circuitry. during the sleep phase the analog part except the oscillators is powered down. low - power mode is entered (left) by writing 1 ( 0) to the (0x11) lowpower_en bit . during the wake - up phase the number of samples required by any enabled inter rupt is processed. if an interrupt is detected , the device stays in the wake - up phase as long as the interrupt condition endures (non - latched interrupt), or until the latch time expires (temporary interrupt), or until the interrupt is reset (latched interr upt). if no interrupt is detected, the device enters the sleep phase. the duration of the sleep phase is set by the (0x11) s leep_dur bits as shown in the following table : l o w - p o w e r m o d e s u s p e n d m o d e n o r m a l m o d e p o w e r o f f
BMA222 data sheet bosch sensortec rev. 1.1 5 page 15 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. table 6 : sleep p hase d uration s ettings (0x11) sleep_dur sleep phase durati on t sleep 0000 b 0.5ms 0001 b 0.5ms 0010 b 0.5ms 0011 b 0.5ms 0100 b 0.5ms 0101 b 0.5ms 0110 b 1ms 0111 b 2ms 1000 b 4ms 1001 b 6ms 1010 b 10ms 1011 b 25ms 1100 b 50ms 1101 b 100ms 1110 b 500ms 1111 b 1s the current consumption of the bma 222 can be calc ulated according to this formula: . when making an estimation about the length of the wake - up phase t active , the wake - up time, t w_up , has to be considered. ther e fore , t active = t ut + t w_up , where t ut is given in t able 8. during the wake - up phase all analog modules are held powered - up, while d uring the sleep phase most analog modules are powered down. as a consequence, a wake - up time of less than 1ms (typ. value 0.8ms) is needed to settle the analog modules in order to get reliable a cceleration data. table 7 gives an overview of the resulting average supply currents i ddlp e for the different sleep phase durations and a selected bandwidth of 1000hz, assuming no interrupt is active and thus only one sample per wake - up phase is taken: active sleep dd active ddsm sleep ddlp t t i t i t i ? ? ? ? ?
BMA222 data sheet bosch sensortec rev. 1.1 5 page 16 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. table 7 : average c urrent c onsumption in l ow - power m ode sleep phase duration average current consumption 0.5ms 100.5 a 1ms 78.8 a 2ms 55.0 a 4ms 34.5 a 6ms 25.2 a 10ms 16.4 a 25ms 7.4 a 50ms 4.0 a 100ms 2.3 a 500ms 0.9 a 1s 0.7 a 4.4 sensor d ata 4.4 .1 acceleration d ata the width of acceleration data is 8 bits given in twos complement representation. the 8 bits for each axis are given in registers ( 0x03) acc_x, (0x05) acc_y and , (0x07) acc_z. the corresponding new data f lags are given as (0x02) new_data_x, (0x04) new_data_y and (0x06) new_data_z . the remaining bits of these registers are fixed to 0. the new data flags (0x02) new_data_x, (0x04) new_data_y and (0x06) new_data_z are set if the corresponding acceleration dat a registers ( 0x03) acc_x, (0x05) acc_y or , (0x07) acc_z have internally been updated. they are reset if the corresponding acceleration data registers have been read. two different streams of acceleration data are available, unfiltered and filtered. the un filtered data is sampled with 2khz. the sampling rate of the filtered data depends on the selected filter bandwi dth; it is twice the bandwidth. which kind of data is stored in the acceleration data registers depends on bit (0x13) data_high_bw . if (0x13) da ta_high_bw is 0 (1), then filtered (unfiltered) data is stored in the registers. both data streams are separately offset - compensated. both kinds of data can be processed by the interrupt controller.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 17 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. the bandwidth of filtered acceleration data is deter mined by setting the (0x10) bw bit as followed: table 8 : bandwidth c onfiguration bw b andwidth update t ime t ut 0 0xxx *) - 0 1000 7.81hz 64 m s 0 1001 15.63hz 32 m s 0 1010 31.25hz 16ms 0 1011 62.5hz 8ms 0 1100 125hz 4ms 0 1101 250hz 2ms 0 1110 500hz 1ms 0 1111 1000hz 0.5ms 1xxxx *) - *) note: settings 00xxx result in a bandwidth of 7.81 hz; settings 1xxxx result in a bandwidth of 1000 hz. it is recommended to actively use the range from 01000b to 01111b only in order to be compatible wit h future products. the bma 222 supports four different a cceleration measurement ranges. a measurement range is selected by setting the (0x0f) range bits as follow s: table 9 : range s election r ange acceleration m easurement r ange resolution 0011 2g 15.6 mg/lsb 0101 4g 31.3 mg/lsb 1000 8g 62 .5 mg/lsb 1100 16g 125mg/lsb others reserved - 4.4 .2 temperature d ata the width of temperature data is 8 bits given in twos complement representation. temperature values are available in the (0x08) temp register. the slope of the temperature sensor is 0.5k/lsb, its center temperature is 24c [ (0x08) temp = 0x00] . therefore, the typical temperature measurement range is - 40c up to 87.5c.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 18 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 4.5 self - test this feature permits to check the sensor function ality by applying electrostatic forces to the sensor core instead of external accelerations. by actually deflecting the seismic mass, the entire signal path of the sensor can be tested. activating the self - test results in a static offset of the acceleratio n data; any external acceleration or gravitational force applied to the sensor during active self - test will be observed in the output as a superposition of both acceleration and self - test signal. the self - test is activated individually for each axis by wr iting the proper value to the (0x32) self_test_axis bits (01b for x - axis, 10b for y - axis, 11b for z - axis, 00b to deactivate self - test). it is possible to control the directio n of the deflection through bit (0x32) self_test_sign . the excitation occu rs in positive (negative) direction if (0x32) self_test_sign = 0b (1b). in order to ensure a proper interpretation of the self - test signal it is recommended to perform the self - test for both (positive and negative) directions and then to calculate the difference of the resulting acceleration values. table 10 shows the minimum differences for each axis. the actually measured signal differences can be significantly larger. table 10: self - test difference values x - axis signal y - axis signal z - axis signal resulting minimum difference signal +0.8 g +0.8 g +0.4 g it is recommended to perform a reset of the device after self - test. if the reset cannot be performed, the following sequence must be kept to prevent unwanted interrupt generation: disab le interrupts, change parameters of interrupts, wait for at least 600 ? s, enable desired interrupts. 4. 6 offset c ompensatio n offsets in measured signals can have several causes but they are always unwanted and disturbing in many cases. therefore, the bma 222 offers an advanced set of four digital offset compensation methods which are closely matched to ea ch other. these are slow, fast, and manual compensation, and inline calibr ation. the compensation is performed for unfiltered and filtered da ta independe ntly . it is done by adding a compensation value to the acceleration data coming from the adc. the result of this computation is saturated if necessary to prevent any overflow errors (the smallest or biggest possible value is set, depending on the sign) . ho wever, the public registers used to read and write compensation values have only a width of 8 bits. an overview of the offset compensation principle is given in f igure 4 :
BMA222 data sheet bosch sensortec rev. 1.1 5 page 19 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. figure 4 : principle of o ffset c ompensation in depe ndence to the measurement range which has been set, the compensation value, which has been written into the public register will correct the data output according to figure 4. e.g. 2g range: public register = 00000001b ? add to acceleration data = 0mg = 0lsb public register = 00000010b ? add to acceleration data = +15.6mg = +1lsb public register = 00000101b ? add to acceleration data = +31.3mg = +2lsb the public registers are image registers of eeprom registers. with each image update (see secti on 4. 7 non - volatile memory for details) the contents of the non - volatile eeprom registers is written to the public registers. at any time the public register can be over - written by the user. after changing the co ntents of the public registers by either an image update or manually, all values are stored in the corresponding internal registers. in the opposite direction, if the value of an internal register changes due to the computation performed by a compensation algorithm, it is stored in the public register. for slow and fast offset compensation, the compensation target can be chosen by setting the bits (0x37) offset_target_x , (0x37) offset_target_y , and (0x37) offset _target_z according to table 11 : b i t _ 1 1 b i t _ 1 0 b i t _ 9 b i t _ 8 b i t _ 7 b i t _ 6 b i t _ 5 b i t _ 4 b i t _ 3 b i t _ 2 b i t _ 1 b i t _ 0 s i g n ( m s b ) 6 2 . 5 m g 3 1 . 3 m g 1 5 . 6 m g 7 . 8 m g ( l s b ) 1 2 5 m g 2 5 0 m g 5 0 0 m g 6 2 . 5 m g 3 1 . 3 m g 1 2 5 m g 2 5 0 m g 5 0 0 m g 6 2 . 5 m g 3 1 . 3 m g 1 5 . 6 m g 1 2 5 m g 2 5 0 m g 5 0 0 m g 6 2 . 5 m g 1 2 5 m g 2 5 0 m g 5 0 0 m g 1 2 5 m g 2 5 0 m g 5 0 0 m g a d d t o a c c e l e r a t i o n d a t a i n r a n g e 2 g 1 6 g 4 g 8 g o f f s e t _ f i l t _ x / y / z o r o f f s e t _ u n f i l t _ x / y / z p u b l i c r e g i s t e r r a n g e c o n v e r s i o n s i g n ( m s b ) s i g n ( m s b ) s i g n ( m s b ) s i g n ( m s b )
BMA222 data sheet bosch sensortec rev. 1.1 5 page 20 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. table 11 : offset t arget s ettings (0x37) offset_target_x/y/z target v alue 00 b 0g 01 b +1g 10 b - 1g 11 b 0g by writing 1 to the (0x36) offset_reset bit, all offset compensation registers are reset to zero. 4. 6 .1 slow c ompensation slow compensation is a quas i - continuous process which regulates the acceleration value of each axis towards the target value by comparing the current value with the target and adding or subtracting a fixed value depending on the comparison. the algorithm in detail: if an accelerati on val ue is larger (smaller) than the target value (0x37) offset_target_x/y/z for a number of samples (given by the parameter offset p er iod see t ab l e 11 ), the internal offset compensation value (0x38, 0x039, 0x3a) offset_filt_x/y/z or (0x3b, 0x03 c , 0x3 d ) o ffset_unfilt_x/y/z is decremented (incremented) by 4 lsb. the public registers (0x38, 0x039, 0x3a) offset_filt_x/y/z and (0x3 b , 0x03 c , 0x3 d ) offset_unfilt_x/y/z are not used for the computations b ut they are updated with the contents of the internal regis ters (using saturation if necessary) and can be read by the user. the compensation period offset_per iod is set by the (0x37) cut _off bit as represented in table 12 : table 12 : compensation p eriod s ettings (0x37) cut_off offset p er iod 0 b 8 1 b 16 the slo w compensation can be enabled (disabled) for each axis independently by setting the bits (0x36) hp_x_en, hp_y_en, hp_z_en to 1 (0), respectively. slow compensation should not be used in combination with low - power mode. in low - power mode the conditions (availability of necessary data) for proper function of slow compensation are not fulfilled. 4. 6 .2 fast c ompensation fast compensation is a one - shot process by which the compensation value is set in such a way that when added to the raw acceleration, th e resulting acceleration value of each axis equals the target value.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 21 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. the algorithm in detail: an average of 16 consecutive acceleration values i s computed and the difference between target value and computed value is written to (0x38, 0x39, 0x3a) offset_f ilt _x/y/z or (0x3b, 0x3c, 0x3d) offset_unfilt _x/y/z the public registers (0x38, 0x39, 0x3a) offset_filt_x/y/z and (0x3b, 0x3c, 0x3d) offset_unfilt_x/y/z are updated with the contents of the internal registers (using saturation if necessary) and can be read by the user. fast compensation is triggered for each axis individually by setting the (0x36) cal_tr igger bits as shown in table 13 : table 13 : fast c ompensation a xis s election (0x36) cal_trigger selected axis 00 b none 01 b x 10 b y 11 b z the register (0x36) cal_trigger keeps its non - zero value while the fast compensation procedure is running. slow compensation is blocked as long as fast compensation endures. bit (0x36) cal_rdy is 0 when (0x36) cal_trigger is not 00. fast compensation should not b e used in combination with low - power mode. in low - power mode the conditions (availability of necessary data) for proper function of fast compensation are not fulfilled. 4. 6 .3 manual c ompensation as explained above, the contents of the public compensation registers (0x38, 0x39, 0x3a) offset_filt_x/y/z and (0x3b, 0x3c, 0x3d) offset_unfilt_x/y/z can be set manually via the digital interface. it is recommended to write into these registers immediately after a new data interrupt in order not to disturb running offset computations. writing to the offset compensation registers is not allowed if slow compensation is enabled or if the fast compensation procedure is running. 4. 6 .4 inline c alibration for a given application, it is often desirable to calibrate the of fset once and to store the compensation values permanently. this can be achieved by using one of the aforementioned offset compensation methods to determine the proper compensation values and then storing these values permanently in the non - volatile memory (eeprom). see section 4.7 non - volatile memory for details of the storing procedure. each time the device is reset, the compensation values are loaded from the non - volatile memory into the image registers and used for offset compensation until they are pos sibly overwritten using one of the other compensation methods.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 22 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 4. 7 non - volatile m emory the entire memory of the bma 222 consists of three different kinds of registers: hard - wired, volatile, and non - volatile. non - volatile memory is implemented as eeprom. p art of it can be both read and written by the user. access to non - volatile memory is only possible through (volatile) image registers. altogether, there are eight registers (bytes) of eeprom which are accessible by the customer. the addresses of the image registers range from 0x38 to 0x3f. while the addresses up to 0x3d are used for offset compensation (see 4.6 offset compensation), addresses 0x3e and 0x3f are general purpose registers not linked to any sensor - specific functionality. the content of the ee prom is loaded to the image registers after a reset (either por or softreset) or after a user request which is performed by writing 1 to bit (0x33) nvm_load . as long as the image update is not yet complete, bit (0x33) nvm_load is 1, otherwise it is 0 . the image registers can be read and written like any other register. writing to the eeprom is a three - step procedure: 1. write t he n ew contents to the image registers. 2. write 1 to bit (0x33) nvm_prog_mode in order to unlock the eeprom. 3. write 1 to bit ( 0x33) nvm_prog_trig and keep 1 in bit (0x33) nvm_prog_mode in order to trigger the write process. writing to the eeprom always renews the entire eeprom contents. it is possible to check the write status by reading bit (0x33) nvm_rdy . while (0x33) nvm_rd y = 0, the write process is still enduring; if (0x33) nvm_rdy = 1, then writing is completed. as long as the write process is ongoing, no power mode change and no image update is allowed. it is forbidden to write to the eeprom while the image update is running, in low - power mode, and in suspend mode. 4. 8 interrupt c ontroller seven interrupt engines are integrated in the bma 222 . each interrupt can be independently enabled and configured. if the condition of an enabled interrupt is fulfilled, the corres ponding status bit is set to 1 and the selected interrupt pin is activated. there are two interrupt pins, int1 and int2; interrupts can be freely mapped to any of these pins. t he pin state is a logic or combination of all mapped interrupts. the interr upt status registers are updated together with writing new data into the acceleration data registers. if an interrupt is disabled, all active status bit s and pins are immediately reset. all time constants are based upon the typical frequency of the intern al oscillator . this is reflected by the bandwidths (bw) as specified in t able 1. 4. 8 .1 general f eatures an interrupt is cleared depending on the selected interrupt mode, which is common to all interrupts. there are three different interrupt modes: non - lat ched, latched, and temporary. the mode is selected by the (0x21) lat ch _int bits according to table 14
BMA222 data sheet bosch sensortec rev. 1.1 5 page 23 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. table 14 : interrupt m ode s election (0x21) lat ch _int interrupt m ode 0000 b non - latched 0001 b temporary, 250ms 0010 b temporary, 500ms 0011 b temporary, 1s 0100 b temporary, 2s 0101 b temporary, 4s 0110 b temporary, 8s 0111 b latched 1000 b non - latched 1001 b temporary, 500s 1010 b temporary, 500s 1011 b temporary, 1ms 1100 b temporary, 12.5ms 1101 b temporary, 25ms 1110 b temporary, 50ms 1111 b latched an interrupt is generated if its activation condition is met. it can not be cleared as long as the activation condition is fulfilled. in the non - latched mode the interrupt status bit and the selected pin (the contribution to the or condition for int1 and /or int2) are cleared as soon as the activation condition is no more valid. exceptions to this behaviour are the new data, orientation, and flat interrupts, which are automatically reset after a fixed time. in the latched mode an asserted interrupt status and the selected pin are cleared by writing 1 to bit (0x21) reset_int . if the activation condition still holds when it is cleared, the interrupt status is asserted again with the next change of the acceleration registers. in the temporary mode an asser ted interrupt and selected pin are cleared after a defined period of time. the behaviour of the different interrupt modes is shown graphically in f igure 5 : figure 5 : interrupt m odes i n t e r n a l s i g n a l f r o m i n t e r r u p t e n g i n e i n t e r r u p t o u t p u t n o n - l a t c h e d t e m p o r a r y l a t c h e d l a t c h p e r i o d
BMA222 data sheet bosch sensortec rev. 1.1 5 page 24 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. several interrupt engines can use either u nfiltered or filtered acceleration data as their input. for these interrupts, the source can be selected with the respective (0x1e) int_src _... bits , in details these are (0x1e) i nt_src_ data , (0x1e ) int_src_tap , (0x1e ) int_src_slope , (0x1e ) int_src_high , and (0x1e ) int_src_low . setting the respective bits to 0 (1) selects filtered (unfiltered) data as input. for the other interrupts, orientation recognition and flat detection, such a selection is not possible. they always use filtered input data. it i s strongly recommended to set interrupt parameters prior to enabling the interrupt. changing parameters of an already enabled interrupt may cause unwanted interrupt generation and generation of a false interrupt history. a safe way to change parameters of an enabled interrupt is to keep the following sequence: disable the desired interrupt, change paramet ers, wa i t for at least 600 ? s, enable the desired interrupt. 4. 8 . 2 mapping (inttype to int pin#) the mapping of interrupts to the interrupt pins #05 or #0 6 is done by registers (0x19) to (0x1b) . setting (0x19) int1 _ inttyp to 1 (0) maps (unmaps) inttyp to pin #5 (int1), correspondingly setting (0x1b) int2 _inttyp to 1 (0) maps (unmaps) inttyp to pin #6 (int2). note: inttyp to be replaced wi th the precise notation, given in the memory map in chapter 5. example: for flat interrupt (int1_flat): setting (0x19) int1 _flat to 1 maps int1 _flat to pin #5 (int1). 4. 8 . 3 electrical b ehaviour (int p in# to open - drive or push - pull) both interrupt pins can be configured to show desired electrical behaviour. the active level of each pin is determined by the (0x20) int1_lvl and (0x20) int2_lvl bits. if (0x20) int1_lvl = 1 (0) / (0x20) int2 _lvl = 1 (0), then p in #05 ( int1 ) / p in #06 ( int2 ) is act ive 1 (0). in addition to that, also the electric type of the interrupt pins can be selected. by setting bits (0x20) int1_od / (0x20) int2_od to 0, the interrupt pin output type gets push - pull , by setting the configuration bits to 1, the output typ e gets open - drive . remark: due to their use for sub - mode selection in d edic ated m ode , the state s of both int pins are not defined during the first 2 ms after power - up. 4. 8 . 4 new d ata i nterrupt this interrupt serves for synchronous reading of acceleration data. it is generated after storing a new value of z - axis acceleration data in the data register. the interrupt is cleared automatically when the next cycle of data acquisition starts. the interrupt status is 0 for at least 50s. the interrupt mode of the new data interrupt is fixed to non - latched. it is enabled (disabled) by writing 1 (0) to bit (0x17) data_en . the interrupt status is stored in bit (0x0a) data_int .
BMA222 data sheet bosch sensortec rev. 1.1 5 page 25 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 4. 8 . 5 any - m otion ( s lope) d etection any - motion detection uses the slope between suc cessive acceleration signals to detect changes in motion. an interrupt is generated when the slope (absolute value of acceleration difference) exceeds a preset threshold. it is cleared as soon as the slope falls below the threshold. the principle is made c lear in f igure 6. figure 6: principle of any - motion detection the threshold is set with the value of register (0x28) slope_th . 1 lsb of (0x28) slope_th corresponds to 1 lsb of acceleration data. t herefore, an increment of (0x 28) slope_th is 15.6 mg in 2g - range ( 31. 3 mg in 4g - range, 62. 5 mg in 8g - range and 12 5 mg in 16g - range). a nd the maximum value is 996 mg in 2 g - range (1.99g in 4g - range, 3.98g in 8g - range and 7.97g in 16g - range). the time difference between the successive acceleration signals depends on the selected bandwidth and equates to 1/(2*bandwidth) ( t=1/(2*bw)). in order to suppress failure signals, the interrupt is only generated (cleared) if a certain number n of consecutive slope data poin ts is larger (smaller) than the slope threshold given by (0x28) slope_th . this number is set by the ( 0x27 ) slope_ dur bits. i t is n = (0x27) slope_dur + 1 for (0x27). example: (0x27) slope_dur = 00b, , 11b = 1 dec imal , , 4 dec imal slope_th int slope acceleration acc(t 0 ) acc(t 0 ?1/(2*bw)) slope(t 0 )=acc(t 0 )?acc(t 0 ?1/(2*bw)) time time time slope_dur slope_du r
BMA222 data sheet bosch sensortec rev. 1.1 5 page 26 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 4. 8 . 5.1 enabling (disabli ng) for each a xis any - motion detection can be enabled (disabled) for each axis separately by writing 1 (0) to bits (0x16) slope_en_x , (0x16) slope_en_y , (0x16) slope_en_z . the criteria for any - motion detection are fulfilled and the slope interrupt is g enerated if the slope of any of the enabled axe s exceeds the threshold (0x28 ) slope_th for [ (0x27 ) slope_dur +1] consecutive times. as soon as the slopes of all enabled axes fall or stay below this threshold for [ (0x27 ) slope_dur +1] consecutive times the interrupt is cleared unle ss interrupt signal is latched. 4. 8 . 5. 2 axis and s ign i nformation of a ny m otion i nterrupt the interrupt status is stored in bit (0x09) slope_int . the any - motion interrupt supplies additional information about the detected slope. t he axis which triggered the interrupt is given by that one of bits (0x0b) slope_first_x , (0x0b) slope_first_y , (0x0b) slope_first_z that contains a 1. the sign of the triggering slope is held in bit (0x0b) slope_sign . if (0x0b) slope_sign = 0 (1), th e sign is positive (negative). 4. 8 . 5. 3 serial i nterface and d edicated w ake - u p m ode when serial interface is active, any - motion detection logic is enabled if any of the axis specific (0x16) slope_ en _... register bits are set. to disable the any - motion inte rrupt, clear all the axis specific (0x16) slope_en_... bits. in the dedicated wake - up mode ( see chapter 4. 2 .2 ), all three axes are enabled for any - motion detection whether the individual axis enable bits are set or not. 4. 8 . 6 tap s ensing tap sensing has a functional similarity with a common laptop touch - pad or clicking keys of a computer mouse. a tap event is detected if a pre - defined slope of the acceleration of at least one axis is exceeded. two different tap events are distinguished: a ? single tap ? is a single event within a certain time, followed by a certain quiet time. a ? double tap ? consists of a first such event followed by a second event within a defined time frame. only one of the tap interrupts can be enabled at the same time. single tap interr upt is enabled (disabled) by writing 1 (0) to bit (0x16) s_tap_en . double tap interrupt is enabled (disabled) by writing 1 (0) to bit (0x16) d_tap_en . if one tries to enable both interrupts by writing 1 to (0x16) s_tap_en and (0x16) d_tap_en , the n only (0x16) d_tap_en keeps the value 1 and the double tap interrupt is enabled. the status of the single tap interrupt is stored in bit (0x09) s_tap_int , the status of the double tap interrupt is stored in bit (0x09) d_tap_int . the slope threshold for detecting a tap event is set by bits (0x2b) tap_th . the meaning of (0x2b) tap_th depends on the range setting. 1 lsb of (0x2b) tap_th corresponds to a slope of 62.5mg in 2g - range, 125mg in 4g - range, 250mg in 8g - range, and 500mg in 16g - range. in f igure 7 the meaning of the different timing parameters is visualized:
BMA222 data sheet bosch sensortec rev. 1.1 5 page 27 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. figure 7 : timing of t ap d etection the parameters (0x2a) tap_shock and (0x2a) tap_quiet apply to both single tap and double tap detection, while (0x2a) tap_dur appl ies to double tap detection only. within the duration of (0x2a) tap_shock any slope exceeding (0x2b) tap_th after the first event is ignored. contrary to this, within the duration of (0x2a) tap_quiet no slope exceeding (0x2b) tap_th must occur, otherwise t he first event will be cancelled. 4. 8 . 6.1 single t ap d etection a single tap is detected and the single tap interrupt is generated after the combined durations of (0x2a) tap_shock and (0x2a) tap_quiet , i f the corresponding slope conditions are fulfilled . t he interrupt is cleared after a delay of 12.5 ms. 4. 8 . 6.2 double t ap d etection a double tap is detected and the double tap interrupt is generated if an event fulfilling the conditions for a single tap occurs within the set duration in (0x2a) tap_dur after the completion of the first tap event. t he interrupt is cleared after a delay of 12.5 ms. t a p _ s h o c k t a p _ q u i e t t a p _ d u r t a p _ s h o c k t a p _ q u i e t t i m e 1 2 . 5 m s s i n g l e t a p d e t e c t i o n d o u b l e t a p d e t e c t i o n s l o p e t i m e 1 2 . 5 m s t i m e 1 s t t a p 2 n d t a p t a p _ t h
BMA222 data sheet bosch sensortec rev. 1.1 5 page 28 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 4. 8 . 6.3 selecting the t iming of t ap d etection for each of parameters (0x2a) tap_shock and (0x2a) tap_quiet two values are selectable. by writing 0 (1) to bit (0x 2a) tap_shock the duration of (0x2a) tap_shock is set to 50 ms (75 ms) . by writing 0 (1) to bit (0x2a) tap_quiet the duration of (0x2a) tap_quiet is set to 30 ms (20 ms). the length of (0x2a) tap_dur can be selected by setting the (0x2a) tap_dur bits according to table 15 : table 15 : selection of tap_dur (0x2a) tap_dur length of tap_dur 000 b 50 ms 001 b 100 ms 010 b 150 ms 011 b 200 ms 100 b 250 ms 101 b 375 ms 110 b 500 ms 111 b 700 ms 4. 8 . 6. 4 axis and s ign i nformation of t ap s ensing the sign of the slope of the first tap which triggered the interrupt is stored in bit (0x0b) tap_sign (0 means positive sign, 1 means negative sign). the value of this bit persists after clearing the interrupt. the axis which triggered the interrupt is indicated by bits (0x0b) tap_first_x , (0x0b) tap_first_y , and (0x0b) tap_first_z . the bit corresponding to the triggering axis contains a 1 while the other bits hold a 0. these bits are cleared together with clearing the interrupt status. 4. 8 . 6.5 tap s ensing i n l ow p ower m ode in low - power mode, a limited number of samples is processed after wake - up to decide whether an interrupt condition is fulfilled. the number of samples is selected by bits (0x2b) tap_samp according to table 16. table 16 : meaning of (0x2b) tap_samp (0x2b) tap_samp number of samples 00 b 2 01 b 4 10 b 8 11 b 16
BMA222 data sheet bosch sensortec rev. 1.1 5 page 29 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 4. 8 . 7 orientation r ecognition the orientation recognition feature informs on an orientation change of the sensor with respect to the gravitational field vector ? g ? . the meas ured acceleration vector components with respect to the gravitational field are defined as shown in f igure 8. figure 8: definition of v ector c omponents therefore, the magnitudes of the acceleration vectors are calculated as follows: acc_x = 1g ? sin ? ? cos j acc_y = ?1g ? sin ? ? sin j acc_z = 1g ? cos ? acc_y/acc_x = ?tan j depending on the magnitudes of the acceleration vectors the orientation of the device in the space is determined and stored in the three (0x0c) orient bits. these bits may not be reset in the sleep phase of low - power mode. there are three orientation calculation modes with different thresholds for switching between different orientations: symmetrical, high - asymmetrical, and low - asymmetrical. the mode is selected by setting the (0x2c) orient_mode bits as given in table 17. table 17 : orientation m ode s ettings (0x2c) orient_mode orientation mode 00 b symmetrical 01 b high - asymmetrical 10 b low - asymmetrical 11 b symmetrical g ? j x y z
BMA222 data sheet bosch sensortec rev. 1.1 5 page 30 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. for each orientation mode the (0x0c ) orient bits have a different meaning as shown in table 18 to table 20: table 18 : meaning of the (0x0c) orient bits in symmetrical mode (0x0c) orient name angle condition x00 portrait upright 315 < j < 45 |acc_y| < |acc_x| - ? hyst ? and acc_x - ?hyst? 0 x01 portrait u pside down 135 < j < 225 |acc_y| < |acc_x| - ?hyst? and acc_x + ?hyst? < 0 x10 landscape left 45 < j < 135 |acc_y| |acc_x| + ?hyst? and acc_y < 0 x11 landscape right 225 < j < 315 |acc_y| |acc_x| + ?hyst? and acc_y 0 ta ble 19 : meaning of the (0x0c) orient bits in high - asymmetrical mode (0x0c) orient name angle condition x00 portrait upright 297 < j < 63 |acc_y| < 2 ? |acc_x| - ?hyst? and acc_x - ?hyst? 0 x01 portrait upside down 117 < j < 243 |acc_y| < 2 ? |acc_x| - ?hyst? and acc_x + ?hyst? < 0 x10 landscape left 63 < j < 117 |acc_y| 2 ? |acc_x| + ?hyst? and acc_y < 0 x11 landscape right 243 < j < 297 |acc_y| 2 ? |acc_x| + ?hyst? and acc_y 0 table 20 : meaning of the (0x0c) orient bits in low - asymmetrical mode (0x0c) orient name angle condition x00 portrait upright 333 < j < 27 |acc_y| < 0.5 ? |acc_x| - ?hyst? and acc_x - ?hyst? 0 x01 portrait upside down 153 < j < 207 |acc_y| < 0.5 ? |acc_x| - ?hyst? and acc_x + ?hyst? < 0 x10 landscape left 27 < j < 153 |acc_y| 0.5 ? |acc_x| + ?hyst? and acc_y < 0 x11 landscape right 207 < j < 333 |acc_y| 0.5 ? |acc_x| + ?hyst? and acc_y 0 in the preceding tables, the parameter ?hyst? stands for a hysteresis, which can be selected by setting the (0x0c) orien t_hyst bits. 1 lsb of (0x0c) orient_hyst always corresponds to 62.5 mg,
BMA222 data sheet bosch sensortec rev. 1.1 5 page 31 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. in 2g - range, 125 mg in 4g - range, 250 mg in 8g - range and 500 mg in 16g - range.. it is important to note that by using a hysteresis 0 the actual switching angles become different from t he angles given in the tables since there is an overlap between the different orientations. the most significant bit of the (0x0c) orient bits (which is displayed as an x in the above given tables ) contains information about the direction of the z - axis. it is set to 0 (1) if acc_z 0 (acc_z < 0). figure 9 shows the typical switching conditions between the four different orientations for the symmetrical mode (i.e. without hysteresis ) : figure 9 : typical o rientation s witching c onditions w/o h ysteresis the orientation interrupt is enabled (disabled) by writing 1 (0) to bit (0x16) orient_en . the interrupt is generated if the value of (0x0c) orient has changed. it is automatically cleared after one stable period of the (0x0c) orient value. the interrupt status is stored in the (0x09) orient_int bit. if temporary or latched interrupt mode is used, after the generation of the interrupt the changed (0x0c) orient valu e is kept fixed as long as the interrupt persists (e. g. until the latch time expires or the interrupt is reset). after clearing the interrupt, the (0x0c) orient is only updated with the next following value change (i.e. with the next occurring interrupt). in order to ensure the continuous availability of up - to - date orientation data it is therefore optimal to use the non - latched interrupt. it is strongly advised against using latched interrupt mode or temporary interrupt mode with latch times above 50 ms fo r orient recognition. 4. 8 . 7.1 orientation b locking the change of the (0x0c) orient value and C as a consequence C the generation of the int errupt can be blocked according to conditions selected by setting the value of the (0x2c) orient_blocking bits as de scribed by table 21. - 2 - 1 . 5 - 1 - 0 . 5 0 0 . 5 1 1 . 5 2 0 4 5 9 0 1 3 5 1 8 0 2 2 5 2 7 0 3 1 5 3 6 0 p h i a c c _ y / a c c _ x a c c _ x / s i n ( t h e t a ) a c c _ y / s i n ( t h e t a ) p o r t r a i t u p r i g h t l a n d s c a p e l e f t p o r t r a i t u p s i d e d o w n l a n d s c a p e r i g h t p o r t r a i t u p r i g h t - 2 - 1 . 5 - 1 - 0 . 5 0 0 . 5 1 1 . 5 2 0 4 5 9 0 1 3 5 1 8 0 2 2 5 2 7 0 3 1 5 3 6 0 j p o r t r a i t u p r i g h t l a n d s c a p e l e f t p o r t r a i t u p s i d e d o w n l a n d s c a p e r i g h t p o r t r a i t u p r i g h t
BMA222 data sheet bosch sensortec rev. 1.1 5 page 32 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. table 21 : blocking c onditions for o rientation r ecognition (0x2c) orient_blocking conditions 00 b no blocking 01 b theta blocking 10 b theta blocking or acceleration slope in any axis > 0.2 g 11 b value of orient is not stable for at l east 100 ms or theta blocking or acceleration slope in any axis > 0.4 g the theta blocking is defined by the following inequality: the parameter blocking _theta of the above given equation stands for the contents of the (0x2d) or ient_theta bits. hereby it is possible to define a blocking angle between 0 and 44.8. the internal blocking algorithm saturates the acceleration values before further processing. as a consequence, the blocking angles are strictly valid only for a device at rest; they can be different if the device is moved. example: to get a maximum blocking angle of 19 the parameter blocking_theta is determined in the following way: (8 * tan(19) )2 = 7.588, therefore , blocking_value = 8 dec = 001000b has to be chosen. in order to avoid unwanted generation of the orientation interrupt in a nearly flat position (z ~ 0, sign change due to small movements or noise), a hysteresis of 0.2 g is implemented for the z - axis, i. e. a after a sign change the interrupt is only gener ated after |z| > 0.2 g. 4. 8 . 8 flat d etection the flat detection feature gives information about the orientation of the devices z - axis relative to the g - vector, i. e. it recogn ize s w h ether the device is in a flat position or not. the condition for the d evice to be in the flat position is . 8 _ tan theta blocking ? ? . 8 _ tan theta parameter ? ?
BMA222 data sheet bosch sensortec rev. 1.1 5 page 33 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. like blocking_theta , used with orientation recognition, the parameter_theta sta nds for a user - defined setting. in this case the content of the (0x2e) flat_theta bits. the possible flat angles al so range from 0 to 44.8. to ensure proper operation, parameter_theta has to be less than or equal to blocking_theta . the flat interrupt is enabled (disabled) by writing 1 (0) to bit (0x16) flat _en . the flat interrupt is generated if the flat value h as changed and the new value is stable for at least the time given by the (0x2f) flat_hold_time bits. the flat value is stored in the (0x0c) flat bit if the interrupt is enabled. this value is 1 if the device is in the flat position, it is 0 otherwise. th e content of the (0x0c) flat bit is changed only if the interrupt is generated. the interrupt is automatically cleared after one sample period. its status is stored in the (0x09) flat_int bit. if temporary or latched interrupt mode is used, after the ge neration of the interrupt the changed (0x0c) flat value is kept fixed as long as the interrupt persists (e. g. until the latch time expires or the interrupt is reset). after clearing the interrupt, the (0x0c) flat value is only updated with the next follow ing value change (i.e. with the next occurring interrupt). the meaning of the (0x2f) flat_hold_time bits can be seen from table 22. table 22 : meaning of flat_hold_time (0x2f) flat_hold_time time 00 b 0 01 b 512 ms 10 b 1024 ms 11 b 2048 ms 4. 8 . 9 low - g i nterrupt this interrupt is based on the comparison of acceleration data against a low - g threshold, which is most useful for free - fall detection. the interrupt is enabled (disabled) by writing 1 (0) to the (0x17) low_en bit. there are two modes avai lable, ? single ? mode and ? sum ? mode. in ? single ? mode, the acceleration of each axis is compared with the threshold; in ? sum ? mode, the sum of absolute values of all accelerations |acc_x| + |acc_y| + |acc_z| is compared with the threshold. the mode is sele cted by the contents of the (0x24) low_mode bit: 0 means ? single ? mode, 1 means ? sum ? mode. the low - g threshold is set through the (0x23) low_th register. 1 lsb of (0x23) low_th always correspond s to an acceleration of 7.81 mg ( i.e. increment is indep endent from g - range setting). a hysteresis can be selected by setting the (0x24) low_hy bits. 1 lsb of (0x24) low_hy always corresponds to an accele ration difference of 125 mg in any g - range (as well, increment is independent from g - range setting). the l ow - g interrupt is generated if the absolute values of the acceleration of all axes (and relation, in case of single mode) or their sum (in case of sum mode) are lower than the
BMA222 data sheet bosch sensortec rev. 1.1 5 page 34 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. threshold for at least the time defined by the (0x22) low_dur register. the in terrupt is reset if the absolute value of the acceleration of at least one axis (or relation, in case of single mode) or the sum of absolute values (in case of sum mode) is higher than the threshold plus the hysteresis for at least one data acquisition. in bit (0x09) low_int the interrupt status is stored. the relation between the content of (0x22) low_dur and the actual delay of the interrupt generation is: delay [ms] = [ (0x22) low_dur + 1] ? 2 ms. therefore, possible delay times range from 2 ms to 512 ms. 4. 8 . 10 high - g i nterrupt this interrupt is based on the comparison of acceleration data against a high - g threshold for the detection of shock or other high - acceleration events. the high - g interrupt is enabled (disabled) per axis by writing 1 (0) t o bits (0x17) high_en_x , (0x17) high_en_y , and (0x17) high_en_z , respectively. the high - g threshold is set through the (0x26) high _th register. the meaning of an lsb of (0x26) high_th depends on the selected g - range: it corresponds to 7.81 mg in 2g - range, 15.63 mg in 4g - range, 31.25 mg in 8g - range, and 62.5 mg in 16g - range (i.e. increment depends from g - range setting). a hysteresis can be selected by setting the (0x24) high _hy bits. an alogously to (0x26) high_th , the meaning of an lsb of (0x24) high _hy is g - range dependent: it corresponds to an ac celeration difference of 125 mg in 2g - range, 250 mg in 4g - range, 500 mg in 8g - range, and 1000mg in 16g - range (as well, increment depends from g - range setting). the high - g interrupt is generated if the absolute val ue of the acceleration of at least one of the enabled axes (or relation) is higher than the threshold for at least the time defined by the (0x25) high _dur register. the interrupt is reset if the absolute value of the acceleration of a ll enabled axes ( an d relation ) i s low er than the threshold min us the hysteresis for at least the time defined by the (0x25) high _dur register. in bit (0x09) high _int the interrupt status is stored. the relation between the content of (0x25) high _dur and the actual delay of the interrupt generation is delay [ms] = [( 0x22 ) low_dur + 1 ] ? 2 ms. therefore, possible delay times range from 2 ms to 512 ms. 4. 8 . 10.1 axis and s ign i nformation of h igh - g i nterrupt the axis which triggered the interrupt is indicated by bits (0x0c) high _first_x , (0x0c) high_first_y , and (0x0c) high_first_z . the bit corresponding to the triggering axis contains a 1 while the other bits hold a 0. these bits are cleared together with clearing the interrupt status. the sign of the triggering acceleration is stored in bit (0x0c) high_sign . if (0x0c) high_sign = 0 (1), t he sign is positive (negative).
BMA222 data sheet bosch sensortec rev. 1.1 5 page 35 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 5 . register d escription 5.1 general r emarks the entire communication with the device is performed by reading from and writing to registers (exception: dedicated mode , see chapter 4.2.2 ). registers have a width of 8 bits; they are mapped to a common space of 64 addresses from ( 0x00 ) up to ( 0x3f ) . within the used range there are several registers which are either completely or partially marked as ? reserved ? . any reserved bit is ignored when it is written and no specific value is guaranteed when read. it is recommended not to use registers at a ll which are completely marked as ? reserved ? . f urther - more it is recommended to mask out (logical and with zero) res erved bits of registers which are partially marked as reserved. registers with addresses from ( 0x00 ) up to ( 0x0e ) are read - only. any attempt to write to these registers is ignored. there are bits within some registers that connected with an action to be d one and, therefore, are intended for write - only access, e. g. (0x21) reset_int or the entire (0x14) softreset register. such bits always give 0 when read.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 36 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 5.2 register m ap register address default value bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 0x3f 0x00 0x3e 0x00 0x3d 0x00 0x3c 0x00 0x3b 0x00 0x3a 0x00 0x39 0x00 0x38 0x00 0x37 0x00 reserved cut_off 0x36 0x10 offset_reset cal_rdy reserved hp_z_en hp_y_en hp_x_en 0x35 0x00 0x34 0x00 i2c_wdt_en i2c_wdt_sel spi3 0x33 0x04 nvm_load nvm_rdy nvm_prog_trig nvm_prog_mode 0x32 0x70 self_test_sign 0x31 0x01 0x30 0x00 0x2f 0x10 0x2e 0x08 0x2d 0x08 0x2c 0x18 reserved 0x2b 0x0a reserved 0x2a 0x04 tap_quiet tap_shock 0x29 0x00 0x28 0x14 0x27 0x00 0x26 0xc0 0x25 0x0f 0x24 0x81 low_mode 0x23 0x30 0x22 0x09 0x21 0x00 reset_int 0x20 0x05 int2_od int2_lvl int1_od int1_lvl 0x1f 0x00 0x1e 0x00 int_src_data int_src_tap reserved int_src_slope int_src_high int_src_low 0x1d 0x00 0x1c 0x00 0x1b 0x00 int2_flat int2_orient int2_s_tap int2_d_tap reserved int2_slope int2_high int2_low 0x1a 0x00 int2_data int1_data 0x19 0x00 int1_flat int1_orient int1_s_tap int1_d_tap reserved int1_slope int1_high int1_low 0x18 0x00 0x17 0x00 data_en low_en high_en_z high_en_y high_en_x 0x16 0x00 flat_en orient_en s_tap_en d_tap_en reserved slope_en_z slope_en_y slope_en_x 0x15 0x00 0x14 0x00 0x13 0x00 data_high_bw 0x12 0x00 0x11 0x00 suspend lowpower_en reserved reserved 0x10 0x1f 0x0f 0x03 0x0e 0x00 0x0d 0x00 0x0c 0x00 flat high_sign high_first_z high_first_y high_first_x 0x0b 0x00 tap_sign tap_first_z tap_first_y tap_first_x slope_sign slope_first_z slope_first_y slope_first_x 0x0a 0x00 data_int reserved 0x09 0x00 flat_int orient_int s_tap_int d_tap_int reserved slope_int high_int low_int 0x08 0x00 0x07 0x00 0x06 0x00 new_data_z 0x05 0x00 0x04 0x00 new_data_y 0x03 0x00 0x02 0x00 new_data_x 0x01 n/a 0x00 0x03 w/r write only read only reserved self_test_axis reserved chip id high_dur<7:0> slope_th<7:0> low_hy<1:0> slope_dur<1:0> high_hy<1:0> temp<7:0> reserved reserved tap_samp<1:0> reserved high_th<7:0> reserved tap_dur<2:0> reserved acc_z<7:0> range<3:0> reserved reserved tap_th<4:0> flat_theta<5:0> flat_hold_time<1:0> reserved reserved orient_blocking<1:0> reserved cal_trigger<1:0> offset_filt_x<7:0> offset_target_z<1:0> offset_filt_y<7:0> offset_filt_z<7:0> offset_target_y<1:0> offset_target_x<1:0> offset_unfilt_z<7:0> offset_unfilt_y<7:0> reserved reserved low_th<7:0> orient_mode<1:0> orient_hyst<2:0> reserved latch_int<3:0> reserved reserved reserved orient_theta<5:0> reserved offset_unfilt_x<7:0> reserved reserved reserved reserved reserved reserved reserved sleep_dur<3:0> bw<4:0> softreset reserved 0 orient[2:0] reserved low_dur<7:0> reserved reserved reserved reserved reserved reserved acc_x<7:0> acc_y<7:0> 0 0
BMA222 data sheet bosch sensortec rev. 1.1 5 page 37 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 5.3 chip id register ( 0x00 ) chip id con tains the c hip id entification n umber. table 23 : chip i dentification n umber , r egister (0x00) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 0 0 0 0 0 1 1 register ( 0x01 ) is reserved 5.4 acceleration d ata register (0x02) contains the new data flag for the x - axis. table 24 : x - axis new data flag , r egister (0x02) (0x02) bit name description bit 7 - (fixed to 0) bit 6 - (fixed to 0) bit 5 - (fixed to 0) bit 4 - (fixed to 0) bit 3 - (fixed to 0) bit 2 - (fixed to 0) bit 1 - (fixed to 0) bit 0 new_data_x new data flag of x - axis register ( 0x03 ) contains the x - axis acceleration data. table 25 : x - axis accelerat ion, r egister (0x0 3 ) (0x03) bit name description bit 7 acc_x _msb <7 > bit 7 of x - axis acceleration data = x msb bit 6 ac c_x_msb <6 > bit 6 of x - axis acceleration data bit 5 acc_x_msb <5 > bit 5 of x - axis acceleration data bit 4 acc_x_msb <4 > bit 4 of x - axis acceleration data bit 3 acc_x_msb <3 > bit 3 of x - axis acceleration data bit 2 acc_x_msb <2 > bit 2 of x - axis accelera tion data bit 1 acc_x_msb <1 > bit 1 of x - axis acceleration data bit 0 acc_x_msb <0 > bit 0 of x - axis acceleration data = x lsb
BMA222 data sheet bosch sensortec rev. 1.1 5 page 38 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. register ( 0x04 ) contains the new data flag for the y - axis. table 26 : y - axis new data flag , r egister (0x0 4 ) (0x04) bi t name description bit 7 - (fixed to 0) bit 6 - (fixed to 0) bit 5 - (fixed to 0) bit 4 - (fixed to 0) bit 3 - (fixed to 0) bit 2 - (fixed to 0) bit 1 - (fixed to 0) bit 0 new_data_y new data flag of y - axis register ( 0x05 ) contains the accelerat ion data for the y - axis. table 27 : y - axis acceleration, r egister (0x0 5 ) (0x05) bit name description bit 7 acc_y _msb <7 > bit 7 of y - axis acceleration data = y msb bit 6 acc_y _msb <6 > bit 6 of y - axis acceleration data bit 5 acc_y _msb <5 > bit 5 of y - a xis acceleration data bit 4 acc_y _msb <4 > bi t 4 of y - axis acceleration data bit 3 acc_y _msb <3 > bit 3 of y - axis acceleration data bit 2 acc_y _msb <2 > bit 2 of y - axis acceleration data bit 1 acc_y _msb <1 > bit 1 of y - axis acceleration data bit 0 acc_y _m sb <0 > bit 0 of y - axis acceleration data = y lsb register ( 0x06 ) contains the new data flag for the z - axis. table 28 : z - axis new data flag , r egister (0x0 6 ) (0x06) bit name description bit 7 - (fixed to 0) bit 6 - (fixed to 0) bit 5 - (fixed to 0) bit 4 - (fixed to 0) bit 3 - (fixed to 0) bit 2 - (fixed to 0) bit 1 - (fixed to 0) bit 0 new_data_z new data flag of z - axis
BMA222 data sheet bosch sensortec rev. 1.1 5 page 39 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. register ( 0x07 ) contains the acceleration data for the z - axis. table 29 : m sb part of z - axis acceleration, r egiste r (0x0 7 ) (0x07) bit name description bit 7 acc_z _msb <7 > bit 7 of z - axis acceleration data = z msb bit 6 acc_z _msb <6 > bit 6 of z - axis acceleration data bit 5 acc_z _msb < 5 > bit 5 of z - axis acceleration data bit 4 acc_z _msb <4 > bit 4 of z - axis accelerat ion data bit 3 acc_z _msb <3 > bit 3 of z - axis acceleration data bit 2 acc_z _msb <2 > bit 2 of z - axis acceleration data bit 1 acc_z _msb <1 > bit 1 of z - axis acceleration data bit 0 acc_z _msb <0 > bit 0 of z - axis acceleration data = z lsb 5.5 temperatur e d ata register ( 0x08 ) temp contains temperature data in two ? s complement representation . center temperature = 24 c ? i.e. ( 0x08) temp = 00000000b 1 lsb increment of temperature sensor is 0.5 c (0.9 f). table 30 : temperature d ata, r egister (0x08) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 t emp <7> t emp <6> t emp <5> t emp <4> t emp <3> t emp <2> t emp <1> t emp <0> 5.6 status r egisters register ( 0x09 ) contains the states of several interrupts. table 31 : interrupt status , r egister (0x0 9 ) (0x09) bit name description bit 7 flat_int flat interrupt status bit 6 orient_int orientation interrupt status bit 5 s_tap_int single tap interrupt status bit 4 d_tap_int double tap interrupt status bit 3 - reserved - reserved bit 2 slope_int slope interrupt status bit 1 high_int high - g interrupt status bit 0 low_int low - g interrupt status
BMA222 data sheet bosch sensortec rev. 1.1 5 page 40 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. register ( 0x0 a ) contains the status of the new data interrupt. table 3 2 : new d ata s tatus , r egister (0x0 a ) (0x0a) bit name description bit 7 data _int n ew data interrupt status bit 6 - reserved - reserved bit 5 - reserved - reserved bit 4 - reserved - reserved bit 3 - reserved - reserved bit 2 - reserved - reserved bit 1 - reserved - reserved bit 0 - reserved - reserved register ( 0x0b ) contains the sign and triggering axis information for the tap and slope interrupts. here tap interrupt comprises both single and double tap interrupt. table 33 : tap and s lope i nterrupts s tatus, r egister (0x0 b ) (0x0b) bit name description bit 7 tap_sign sign of 1 st tap that triggered the interrupt (0=positive, 1=negative) bit 6 tap_first_ z 1 indicates that z - axis is triggering axis of tap interrupt bit 5 tap_first_y 1 indicates that y - axis is triggering axis of tap interrupt bit 4 tap_first_ x 1 indicates that x - axis is triggering axis of tap interrupt bit 3 slope_sign sign of slope that triggered the interrupt (0=positive, 1=negative) bit 2 slope_first_ z 1 indicates that z - axis is triggering axis of slope interrupt bit 1 slope_first_y 1 indicates that y - axis is triggering axis of slope interrupt bit 0 slope_first_ x 1 indicates that x - axis is triggering axis of slope interrupt register ( 0x0c ) contains the flat and orientation status, and the sign and triggering axis information for the high - g interrupt. registers (0x0d) and (0x0e) are reserved . table 34 : flat and o rientation s tatus, r egister (0x0 c ) (0x0c) bit name description bit 7 flat flat detection (1 if flat condition is fulfilled, 0 otherwise) bit 6 o rient <2> orie ntation value of z - axis (0 if upward looking, 1 if downward looking) bit 5 o rient <1> orientation value of x - y plane (00 =portrait upright, 01=portrait upside - down, 10=landscape left, 11=landscape right) bit 4 o rient <0> bit 3 high_sign sign of slope that triggered the interrupt (0=positive, 1=negative) bit 2 high_f irst_z 1 indicates that z - axis is triggering axis of high - g interrupt bit 1 high_first_y 1 indicates that y - axis is triggering axis of high - g interrupt bit 0 high_first_ x 1 indicates that x - axis is triggering axis of high - g interrupt r egisters (0x0d ) and (0x0e ) are reserved .
BMA222 data sheet bosch sensortec rev. 1.1 5 page 41 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 5.7 g - r ange s election register ( 0x0f ) contains the selection of the g - range. proper settings for (0x0f) range are 0011b (selects 2g range), 0101b (selects 4g range), 1000b (selects 8g range), 1100b (selects 16g range). all other settings are irregular; if such a setting is used, 2g range is selected. default value of (0x0f) range (after reset) is 0011b. table 35 : g - r ange , r e gister (0x0 f ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 reserved reserved reserved reserved range <3> range <2> range <1> range <0> 5.8 bandwidth s register (0x10) contains the selection of the bandwidth for filtered acceleration data. settings fo r (0x10) bw are 00xxxb (bandwidth = 7.81 hz), 01000b (bandwidth = 7.81 hz), 01001b (bandwidth = 15.63 hz), 01010b (bandwidth = 31.25 hz), 01011b (bandwidth = 62.5 hz), 01100b (bandwidth = 125 hz), 01101b (bandwidth = 250 hz), 01110b (bandwi dth = 500 hz), 01111b (bandwidth = 1000 hz), 1xxxxb (bandwidth = 1000 hz). default value of (0x10) bw (after reset) is 11111b. it is recommended to actively use the range from 01000b to 01111b only in order to be compatible with future products. table 36 : bandwidth s , r egister (0x 10 ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 reserved reserved reserved bw <4> bw <3> bw <2> bw <1> bw <0> 5.9 power m odes register (0x11) contains the configuration of the power modes. (0x11) suspend = 1 (0) sets (resets) suspend mode; default value of (0x11) suspend is 0. (0x11) lowpower_en = 1 (0) sets (resets) low - power mode, default value of (0x11) lowpower_en is 0. the settings for (0x11) sleep_dur are 0000b to 0101b (sleep phase dura tion = 0.5 ms), 0110b (sleep phase duration = 1 ms), 0111b (sleep phase duration = 2 ms), 1000b (sleep phase duration = 4 ms), 1001b (sleep phase duration = 6 ms), 1010b (sleep phase duration = 10 ms), 1011b (sleep phase duration = 25 ms), 110 0b (sleep phase duration = 50 ms), 1101b (sleep phase duration = 100 ms), 1110b (sleep phase duration = 500 ms), 1111b (sleep phase duration = 1 s). default value of (0x11) sleep_dur is 0000b. table 37 : power m odes , r egister (0x1 1 ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 suspend lowpower _en reserved sleep_ dur<3> sleep_ dur<2> sleep_ dur<1> sleep_ dur<0> reserved
BMA222 data sheet bosch sensortec rev. 1.1 5 page 42 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 5.10 special c ontrol s ettings register (0x12) is reserved . register (0x13) contains settings for the configuration of th e acceleration data acquisition. (0x13) data_high_bw = 0 (1) selects filtered (unfiltered) acceleration data to be written into the data registers (0x02) to (0x07). default value of (0x13) data_high_bw is 0. table 38 : acceleration d ata a cqui sition & d ata o utput f ormat , r egister (0x1 3 ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 data_high _bw reserved reserved reserved reserved reserved reserved reserved register (0x14) is the softreset register. a user - triggered reset (softreset) of t he sensor is performed after writing 0xb6 to the softreset register. after that reset all registers return to their default values. reading (0x14) softreset returns 0x00. register (0x15) is reserved . 5.11 interrupt s ettings register s (0x16) and (0x 17) contain the enable bits for the interrupts. default value of each enable bit is 0. table 39 : interrupt s etting , r egister (0x1 6 ) (0x16) bit name description bit 7 flat_en 1 (0) enables (disables) flat interrupt bit 6 orient_en 1 (0) e nables (disables) orientation interrupt bit 5 s_tap_en 1 (0) enables (disables) single tap interrupt bit 4 d_tap_en 1 (0) enables (disables) double tap interrupt bit 3 - reserved - reserved bit 2 slope_en_z 1 (0) enables (disables) slope in terrupt for z - axis bit 1 slope_en_y 1 (0) enables (disables) slope interrupt for y - axis bit 0 slope_en_x 1 (0) enables (disables) slope interrupt for x - axis
BMA222 data sheet bosch sensortec rev. 1.1 5 page 43 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. table 40 : interrupt setting , r egister (0x17) (0x17) bit name description bit 7 - reserved - reserved bit 6 - reserved - reserved bit 5 - reserved - reserved bit 4 data_en 1 (0) enables (disables) new data interrupt bit 3 low_en 1 (0) enables (disables) low - g interrupt bit 2 high_en_z 1 (0) enables (disables) high - g in terrupt for z - axis bit 1 high_en_y 1 (0) enables (disables) high - g interrupt for y - axis bit 0 high_en_x 1 (0) enables (disables) high - g interrupt for x - axis register (0x18) is reserved . registers (0x19) to (0x1b ) contain the mapping of inter rupts onto the interrupt pins. default value of each mapping bit is 0. table 41 : interrupt m apping , r egister (0x1 9 ) (0x19) bit name description bit 7 int1_flat 1 (0) maps (unmaps) flat interrupt to int1 pin bit 6 int1_orient 1 (0) maps (u nmaps) orientation interrupt to int1 pin bit 5 int1_s_tap 1 (0) maps (unmaps) single tap interrupt to int1 pin bit 4 int1_d_tap 1 (0) maps (unmaps) double tap interrupt to int1 pin bit 3 - reserved - reserved bit 2 int1_slope 1 (0) maps (un maps) slope interrupt to int1 pin bit 1 int1_high 1 (0) maps (unmaps) high - g interrupt to int1 pin bit 0 int1_low 1 (0) maps (unmaps) low - g interrupt to int1 pin table 42 : interrupt m apping, r egister (0x 1a ) (0x1a) bit name description bit 7 int2_data 1 (0) maps (unmaps) new data interrupt to int2 pin bit 6 - reserved - reserved bit 5 - reserved - reserved bit 4 - reserved - reserved bit 3 - reserved - reserved bit 2 - reserved - reserved bit 1 - reserved - reserved bit 0 int 1_data 1 (0) maps (unmaps) new data interrupt to int1 pin
BMA222 data sheet bosch sensortec rev. 1.1 5 page 44 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. table 43 : interrupt mapping, register (0x1b) (0x1b) bit name description bit 7 int2_flat 1 (0) maps (unmaps) flat interrupt to int2 pin bit 6 int2_orient 1 (0) maps (u nmaps) orientation interrupt to int2 pin bit 5 int2_s_tap 1 (0) maps (unmaps) single tap interrupt to int2 pin bit 4 int2_d_tap 1 (0) maps (unmaps) double tap interrupt to int2 pin bit 3 - reserved - reserved bit 2 int2_slope 1 (0) maps (un maps) slope interrupt to int2 pin bit 1 int2_high 1 (0) maps (unmaps) high - g interrupt to int2 pin bit 0 int2_low 1 (0) maps (unmaps) low - g interrupt to int2 pin registers (0x1c) and (0x1d) are reserved . register (0x1e) contains the data sou rce definition for those interrupts with selectable data source. default value of each data source selection bit is 0. table 44 : interrupt d ata s ource d efinition, r egister (0x1e) (0x1e) bit name description bit 7 - reserved - reserved bit 6 - rese rved - reserved bit 5 int_src_data 1 (0) selects unfiltered (filtered) data for the new data interrupt bit 4 int_src_tap 1 (0) selects unfiltered (filtered) data for the single tap and double tap interrupts bit 3 - reserved - reserved bit 2 int _src_slope 1 (0) selects unfiltered (filtered) data for the slope interrupt bit 1 int_src_high 1 (0) selects unfiltered (filtered) data for the high - g interrupt bit 0 int_src_low 1 (0) selects unfiltered (filtered) data for the low - g interrup t register (0x1f) is reserved . register (0x20) contains the behavioural configuration (electrical behaviour) of the interrupt pins. default value of (0x 20 ) int1_od and (0x 20 ) int2_od is 0. default value of (0x 20 ) int1_lvl and (0x 20 ) int2_lvl is 1. table 45 : electrical b ehaviour of i nterrupt p in , r egister (0x20) (0x20) bit name description bit 7 - reserved - reserved bit 6 - reserved - reserved bit 5 - reserved - reserved bit 4 - reserved - reserved bit 3 int2_od 0 selects push - pull, 1 selects open drive for int2 pin bit 2 int2_lvl 0 (1) selects active level 0 (1) for int2 pin bit 1 int1_od 0 selects push - pull, 1 selects open drive for int1 bit 0 int1_lvl 0 (1) selects active level 0 (1) for int1 pin
BMA222 data sheet bosch sensortec rev. 1.1 5 page 45 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. register ( 0x21) contains the interrupt reset bit and the interrupt mode selection. w riting 1 to (0x21) reset_int resets any latched interrupt . the settings for (0x2 1) latch_int are 0000b (non - latched), 0001b (temporary, 250 ms), 0010b (temporary, 500 ms), 0011b (temporary, 1 s), 0100b (temporary, 2 s), 0101b (temporary, 4 s), 0110b (temporary, 8 s), 0111b (latched), 1000b (non - latched), 1001b (temporary, 500 ? s), 1010b (temporary, 500 ? s), 1011b (temporary, 1 ms), 1100b (temporary, 12.5 ms), 1101b (temporary, 25 ms), 1110b (temporary, 50 ms), 1111b (latched). default value of (0x 21 ) latch_int is 0000b. table 46 : interrupt r eset b it and i nte rrupt mode s election, r egister (0x21) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 reset_int reserved reserved reserved latch_ int<3> latch_ int<2 > latch_ int<1> latch_ int<0> register (0x22) contains the delay time definition for the low - g interrup t. the physical delay time can be computed from the content of (0x22) low_dur according to: delay [ms] = [ (0x22) low_dur + 1] ? 2 ms. possible delay times range from 2 ms to 512 ms. default value of (0x22) low_dur is 0x09, corresponding to a delay of 20 ms. table 47 : delay t ime d efinition for the l ow - g i nterrupt, r egister (0x2 2 ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 low_ dur<7> low_ dur<6> low_ dur<5> low_ dur<4> low_ dur<3> low_ dur<2> low_ dur<1> low_ dur<0> register (0x23) contains t he threshold definition for the low - g interrupt. an lsb of (0x23) low_th corresponds to an actual acceleration of 7.81 mg. therefore, the threshold ranges from 0 g to 1.992 g. default value of (0x23) low_th is 0x30, corresponding to an acceleration of 375 mg. table 48 : threshold d efinition for the l ow - g i nterrupt, r egister (0x23) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 low_ th<7> low_ th<6> low_ th<5> low_ th<4> low_ th<3> low_ th<2> low_ th<1> low_ th<0> register (0x24) contains the low - g interrupt mode selection, the low - g interrupt hysteresis setting, and the high - g interrupt hysteresis setting. setting (0x24 ) low_mode to 0 (1) selects single mode (sum mode). default value is 0 (single mode). (0x24 ) low_hy sets the hysteresi s of the low - g interrupt. an lsb of (0x24 ) low_hy corresponds to an acceleration difference of 125 mg. default value of (0x24 ) low_hy is 01b.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 46 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. (0x24 ) high_hy sets the hysteresis of the high - g interrupt. the meaning of an lsb of (0x24 ) high_hy depends on the selected g - range. it corresponds to an acceleration difference of 125 mg in 2g - range, 250 mg in 4g - range, 500 mg in 8g - range, and 1000mg in 16g - range. default value of (0x24 ) high_hy is 10b. table 49 : threshold d efinition for the l ow - g i nterru pt, r egister (0x2 4 ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 high_ hy<1> high_ hy<0> reserved reserved reserved low_ mode low_ hy<1> low_ hy<0> register (0x25) contains the delay time definition for the high - g interrupt. the physical delay time c an be computed from the content of (0x25 ) high _dur according to delay [ms] = [ (0x2 5 ) high _dur + 1] ? 2 ms. possible delay times range from 2 ms to 512 ms. default value of (0x25 ) high _dur is 0x0f, corresponding to a delay of 32 ms. table 50 : dela y t ime d efinition for the h igh - g i nterrupt, r egister (0x2 5 ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 high_ dur<7> high_ dur<6> high_ dur<5> high_ dur<4> high_ dur<3> high_ dur<2> high_ dur<1> high_ dur<0> register (0x26) contains the threshold d efinition for the high - g interrupt. the meaning of an lsb of (0x26) high_th depends on the selected g - range. it corresponds to 7.81 mg in 2g - range, 15.63 mg in 4g - range, 31.25 mg in 8g - range, and 62.5 mg in 16g - range. default value of (0x26) high_th is 0xc 0. table 51 : t hreshold d efinition for the h igh - g i nterrupt, r egister (0x2 6 ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 high _ th<7> high _ th<6> high _ th<5> high _ th<4> high _ th<3> high _ th<2> high _ th<1> high _ th<0> register (0x27) contains t he definition of the number of samples to be evaluated for the slope interrupt (any - motion detection). the number of samples is n = (0x27) slope_dur + 1 . default value of (0x27) slope_dur is 00b. table 52 : s amples n umber d efinition for the s lope i n terrupt, r egister (0x27) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 reserved reserved reserved reserved reserved reserved slope_ dur <1> slope_ dur <0>
BMA222 data sheet bosch sensortec rev. 1.1 5 page 47 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. register (0x28) contains the threshold definition for the slope interrupt. an lsb of (0x28 ) slope _th corresponds to an lsb of acceleration data. its meaning therefore depends on the selected g - range. default value of (0x28 ) slope _th is 0x14. table 53 : slope threshold for the s lope i nterrupt, r egister (0x2 8 ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bi t 1 bit 0 slope_ th<7> slope_ th<6> slope_ th<5> slope_ th<4> slope_ th<3> slope_ th<2> slope_ th<1> slope_ th<0> register (0x29) is reserved . register (0x2a) contains the timing definitions for the single tap and double tap interrupts. (0x2a) tap_q uiet = 0 (1) selects a quiet duration of 30 ms (20 ms). the default value of (0x2a) tap_quiet is 0. (0x2a) tap_ shock = 0 (1) selects a shock duration of 50 ms (75 ms). the default value of (0x2a) tap_ shock is 0. (0x2a) tap_ dur selects the len gth of the time window for the second shock event (for double tap detection). the settings for (0x2a) tap_ dur are 000b (50 ms), 001b (100 ms), 010b (150 ms), 011b (200 ms), 100b (250 ms), 101b (375 ms), 110b (500 ms), 111b (700 ms). the def ault value of (0x2a) tap_ dur is 100b. table 54 : tap quiet d uration and t ap s hock d uration , r egister (0x2 a ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 tap_ quiet tap_ shock reserved reserved reserved tap_ dur<2> tap_ dur<1> tap_ dur<0> regi ster (0x2b) contains the definition of the number of samples to be processed after wake - up in low - power mode and the threshold definition for the single and double tap interrupts. (0x2b ) tap_ samp selects the number of samples that are processed after wake - up in the low - power mode. the settings for (0x2b ) tap_ samp are 00b (2 samples), 01b (4 samples), 10b (8 samples), and 11b (16 samples). default value of (0x2b ) tap_ samp is 00b. the meaning of an lsb of (0x2b ) tap _th depends on the selected g - ran ge. it corresponds to an acceleration difference of 62.5mg in 2g - range, 125mg in 4g - range, 250mg in 8g - range, and 500mg in 16g - range. default value of (0x2b ) tap _th is 0x0a. table 55 : samples n umber after w ake - u p and t hreshold t ap i nterrupt , r egister (0x2 b ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 tap_ samp<1> tap_ samp<0> reserved tap_ th<4> tap_ th<3> tap_ th<2> tap_ th<1> tap_ th<0>
BMA222 data sheet bosch sensortec rev. 1.1 5 page 48 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. register (0x2c) contains the definition of hysteresis, blocking, and mode for the orientation interrupt. (0x 2 c) orient_hyst sets the hysteresis of the orientation interrupt; 1 lsb always corresponds to 62.5 mg , in any g - range (i.e. increment is independent from g - range setting). default value of (0x2 c) orient_hyst is 001b. (0x2 c) orient _blocking selects the k ind of blocking that is used for the generation of the orientation interrupt. the settings for (0x2c) orient_blocking are 00b (no blocking), 01b (theta blocking), 10b (theta blocking or slope in any axis > 0.2 g), and 11b ( orient value not stable f or at least 100 ms or theta blocking or slope in any axis > 0.4 g). default value of (0x2 c) orient_blocking is 10b. (0x2c) orient_mode sets the thresholds for switching between the different orientations. the settings for (0x2c) orient_mode are 00b ( symmetrical), 01b (high - asymmetrical), 10b (low - asymmetrical), 11b (symmetrical). default value of (0x2c) orient_mode is 00b. table 56 : h ysteresis, b locking for orientation i nterrupt, register (0x2c) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 reserved orient_ hyst<2> orient_ hyst<1> orient_ hyst<0> orient_ blocking<1> orient_ blocking<0> orient_ mode<1> orient_ mode<0> register (0x2 d ) contains the definition of the theta blocking angle for the orientation interrupt. (0x2d ) orient_ thet a defines a blocking angle between 0 and 44.8 as described in section 4.8.1.7 orientation blocking . default value of (0x2d ) orient_ theta is 0x08. table 57 : theta b locking a ngle, r egister (0x2 d ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 res erved reserved orient_ theta<5> orient_ theta<4> orient_ theta<3> orient_ theta<2> orient_ theta<1> orient_ theta<0> register (0x2e) contains the definition of the flat threshold angle for the flat interrupt. (0x2e ) flat _ theta defines a blocking angle b etween 0 and 44.8 as described in section 4.8.8 flat detection . default value of (0x2e ) fla t_ theta is 0x08. table 58 : flat t hreshold a ngle, r egister (0x2e) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 reserved reserved fla t_ theta<5> flat _ the ta<4> fla t_ theta<3> fla t_ theta<2> fla t_ theta<1> fla t_ theta<0> register (0x2f) contains the definition of the flat hold time. (0x2f) flat_hold_time defines the time a new flat value has to be at least stable for before the interrupt is generated. the settings for (0x2f) flat_hold_time are 00b (0), 01b (512 ms), 10b (1024 ms), 11b (2048 ms). default value of (0x2f) flat_hold_time is 01b.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 49 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. table 59 : flat t hreshold a ngle, r egister (0x2f) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 res erved reserved flat_hold _ t ime < 1 > fla t_ hold_ t ime < 0 > reserved reserved reserved reserved register (0x30) and (0x31) are reserved . 5.12 self - t est register (0x32) contains the settings for the activation of the sensor self - test. (0x32) self_test_sign s ets the sign of the electrostatic excitation. the settings for (0x32) self_test_sign are 0 (positive sign) and 1 (negative sign). default value of (0x32) self_test_sign is 0. (0x32) self_test_axis defines the axis which shall be excited. only one ax is can be excited at the same time. the settings for (0x32) self_test_axis are 00b (no self - test), 01 (x - axis), 10 (y - axis), and 11 (z - axis). default value of (0x32) self_test_axis is 00b. table 6 0 : sensor s elf - t est, r egister (0x32) bit 7 b it 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 reserved reserved reserved reserved reserved self_test _sign self_test _axis<1> self_test _axis<0> 5.1 3 non - volatile m emory c ontrol (eeprom c ontrol) register (0x3 3 ) contains the control settings for the non - vo latile memory (eeprom). (0x33) nvm_load is used to perform a user - defined image update. writing 1 (0x33) nvm_load starts the update procedure. the value 1 is kept as long as the update procedure runs, afterwards it is reset to 0. (0x33) nvm_rdy cont ains the status of writing the eeprom. (0x33) nvm_rdy is 0 as long as writing the eeprom endures, it is 1 if currently no write access is performed and, therefore, a new write access can be initiated. writing 1to (0x33) nvm_prog_trig triggers writin g the eeprom. the eeprom can only be written if it was unlocked before. writing 1to (0x33) nvm_prog_mode unlocks the eeprom.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 50 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. table 61 : eeprom c ontrol s ettings, r egister (0x3 3 ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 reserved reserved rese rved reserved nvm_load nvm_rdy nvm_prog _trig nvm_prog _mode 5.1 4 interface c onfiguration register (0x34) contains the settings for the digital interfaces. writing 1to (0x34) i2c_wdt_en enables the watchdog at the sdi pin (= sda for i2c) if i2c is s elected. default value of (0x34) i2c_wdt_en is 0. (0x34) i2c_wdt_sel selects the i2c data pad watchdog timer period. the settings for (0x34) i2c_wdt_sel are 0 (1 ms) and 1 (50 ms). default value of (0x34) i2c_wdt_sel is 0. (0x34) spi3 selects the spi mode. the settings for (0x34) spi3 are 0 (4 - wire spi) and 1 (3 - wire spi). default value of (0x34) spi3 is 0. table 62 : eeprom c ontrol s ettings, r egister (0x3 4 ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 reserved reserved reserved res erved reserved i2c_wdt _en i2c_wdt _sel spi3 register (0x35) is reserved .
BMA222 data sheet bosch sensortec rev. 1.1 5 page 51 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 5.1 5 offset c ompensation register (0x36) contains settings for the offset compensation in general, for fast offset compensation, and for slow offset compensation. writing 1to (0x36) offset_reset sets all offset compensation registers (0x38 to 0x3d) to zero. default value of (0x36) offset_reset is 0. (0x36) cal_trigger starts the fast compensation process for the specified axis. the settings for (0x36) cal_trigger are 00b (no axis selected), 01b (x - axis), 10b (y - axis), 11b (z - axis). a non - zero value is kept until the fast compensation procedure is finished. default value of (0x36) cal_trigger is 00b. (0x36) cal_rdy indicates the state of the fast compensation. (0x 36) cal_rdy is 0 when (0x36) cal_trigger has a nonzero value, otherwise (0x36) cal_rdy is 1. writing 1 (0) to (0x36) hp_z_en enables (disables) slow offset compensation for the z - axis. writing 1 (0) to (0x36) hp_y_en enables (disables) slow of fset compensation for the y - axis. writing 1 (0) to (0x36) hp_x_en enables (disables) slow offset compensation for the x - axis. default value for each of (0x36) hp_x_en, (0x36) hp_y_en, and (0x36) hp_x_en is 0, respectively. table 6 3 : offset c omp ensation , f ast o ffset c ompensation , r egister (0x36) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 offset _reset cal_ trigger<1> cal_ trigger<0> cal_rdy reserved hp_z_en hp_y_en hp_x_en register (0x37) contains settings for the offset compensation in general, and for slow offset compensation. (0x37) offset_target_z sets the target value for the offset compensation of the z - axis. (0x37) offset_target_y sets the target value for the offset compensation of the y - axis. (0x37) offset_target_x sets the targ et value for the offset compensation of the x - axis. the settings for (0x37) offset_target_x, (0x37) offset_target_y, and (0x37) offset_target_z are 00b (0 g), 01b (+1 g), 10b ( - 1 g), and 11b (0 g). default value of each of (0x37) offset_target_x, ( 0x37) offset_target_y, and (0x37) offset_target_z is 00b, respectively. (0x37) cut_off defines the number of samples for comparison by the slow offset compensation. the settings for (0x37) cut_off are 0 (8 samples) and 1 (16 samples). the default va lue of (0x37) cut_off is 0. table 6 4 : offset c ompensation, s low o ffset c ompensation, r egister (0x37) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 reserved offset_tar get_z<1> offset_tar get_z<0> offset_tar get_y<1> offset_tar get_y<0> offset_tar get _x<1> offset_tar get_x<0> cut_off
BMA222 data sheet bosch sensortec rev. 1.1 5 page 52 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. register (0x38) contains the compensation value for filtered data for t he x - axis. the contents of each of the registers (0x 38 ) to (0x3d ) is added to the corresponding acceleration data; it can be set either automatically b y one of the implemented compensation algorithms or manually. these registers are image registers of registers in the eeprom; the content of the eeprom is copied to them after every reset. table 6 5 : f iltered d ata c ompensation for the x - axis, r egister (0x38) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 offset_ filt_x <7> offset_ filt_x<6> offset_ filt_x<5> offset_ filt_x<4> offset_ filt_x<3> offset_ filt_x<2> offset_ filt_x<1> offset_ filt_x<0> register (0x39) contains the compensation value for filtered data for t he y - axis. table 6 6 : filtered d ata c ompensation for the y - axis, r egister (0x39) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 offset_ filt_y<7> offset_ filt_y<6> offset_ filt_y<5> offset_ filt_y<4> offset_ filt_y<3> offset_ filt _y<2> offset_ filt_y<1> offset_ filt_y<0> register (0x3a) contains the compensation value for filtered data for t he z - axis. table 67 : filtered d ata c ompensation for the z - axis, r egister (0x3a) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 offse t_ filt_z<7> offset_ filt_z<6> offset_ filt_z<5> offset_ filt_z<4> offset_ filt_z<3> offset_ filt_z<2> offset_ filt_z<1> offset_ filt_z<0> register (0x3b) contains the compensation value for un filtered data for t he x - axis. table 6 8 : u n filtered d at a c ompensation for the x - axis, r egister (0x3 b ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 offset_ unfilt_x <7> offset_ unfilt_x <6> offset_ unfilt_x <5> offset_ unfilt_x <4> offset_ unfilt_x <3> offset_ unfilt_x <2> offset_ unfilt_x <1> offset_ unfil t_x <0> register (0x3c) contains the compensation value for un filtered data for t he y - axis. table 69 : unfiltered d ata c ompensation for the x - axis, r egister (0x3c) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 offset_ unfilt_y <7> offset_ unfilt _y <6> offset_ unfilt_y <5> offset_ unfilt_y <4> offset_ unfilt_y <3> offset_ unfilt_y <2> offset_ unfilt_y <1> offset_ unfilt_y <0>
BMA222 data sheet bosch sensortec rev. 1.1 5 page 53 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. register (0x3d) contains the compensation value for un filtered data for t he z - axis. table 7 0 : unfiltered d ata c ompen sation for the y - axis, r egister (0x3 d ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 offset_ unfilt_z <7> offset_ unfilt_z <6> offset_ unfilt_z <5> offset_ unfilt_z <4> offset_ unfilt_z <3> offset_ unfilt_z <2> offset_ unfilt_z <1> offset_ unfilt_z <0> registers (0x3e) and (0x3f) are image registers of registers in the eeprom. they are not linked to any sensor - specific functionality.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 54 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 6 . digital i nterfaces the bma 222 supports two serial digital interface protocols for communication as a slave with a host device (when operating in general mode): spi and i2c. the active interface is selected by the state of the pin#11 ( ps ) ?protocol select? pin: 0 (1) selects spi (i2c). for details see section 4.2 operational modes. by default, spi operates in t he standard 4 - wire configuration. it can be re - configured by software to work in 3 - wire mode instead of standard 4 - wire mode. both interfaces share the same pins. the mapping for each interface is given in the following table : table 71 : mapping of the i n terface p ins pin # name u se w/ spi u se w/ i2c description 1 sdo sdo address spi: data output (4 - wire mode) i2c: used to set lsb of i2c address 2 sd x sdi sda spi: data input (4 - wire mode) data input / output (3 - wire mode) i2c: serial data 10 csb csb unu sed chip select (enable) 12 sc x sck scl spi: serial clock i2c: serial clock the following table shows the electrical specification s of the interface pins: table 7 2 : electrical specification of the i nterface p ins parameter symbol condition min typ max units ps impedance for tri - state detection r ts 1 m ? c ts 10 pf ps impedance for non - tri - state r nts 5 k ? pull - up resistance r up internal pull - up resistance to vddio 70 120 190 k ? pull - down resistance r down internal pull - down resistance to gnd 12 20 32 k ? input capacitance c in 5 10 pf i2c bus load capacitance (max. drive capability) c i2c_load 400 pf
BMA222 data sheet bosch sensortec rev. 1.1 5 page 55 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 6.1 serial p eripheral i nterface (spi) the timing specification for spi of the bma 222 is given in the following table : table 7 3 : spi t iming parameter symbol condition min max units clock fr equency f spi max. load on sdi or sdo = 25pf 10 mhz sck low pulse t sckl 20 ns sck high pulse t sckh 20 ns sdi setup time t sdi_setup 20 ns sdi hold time t sdi_hold 20 ns sdo output delay t sdo_od load = 25pf 30 ns load = 250pf, v ddio = 2.4v 4 0 ns csb setup time t csb_setup 20 ns csb hold time t csb_hold 40 ns the following figure shows the definition of the spi timings given i n table 7 3 : figure 10 : spi t iming d iagram the spi interface of the bma 222 is com patible with two modes, 00 and 11. the automatic selection between [cpol = 0 and cpha = 0] and [cpol = 1 and cpha = 1] is done based on the value of sck after a falling edge of csb. two configurations of the spi interface are supported by the bma 222 : 4 - wire and 3 - wire. the same protocol is used by both configurations. the device operates in 4 - wire configuration by default. it can be switched to 3 - wire configuration by writing 1 to (0x34) spi3 . pin sdi is used as the common data pin in 3 - wire configuration. t s d i _ h o l d t s c k h t c s b _ h o l d t c s b _ s e t u p t s d i _ s e t u p t s c k l t s d o _ o d c s b s c k s d i s d o
BMA222 data sheet bosch sensortec rev. 1.1 5 page 56 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. for single byte read as well as write operations, 16 - bit protocols are used . the bma 222 also supports multiple - byte read operations. in spi 4 - wire configuration csb (chip select low active), sck (serial clock), sdi (serial data input), and sdo (serial data output) pins are used. the communication starts when the csb is pulled low by the spi master and stops when csb is pulled high. sck is also controlled by spi master. sdi and sdo are driven at the falling edge of sck and should be captured at the rising edge of sck. the basic write operation waveform for 4 - wire configuration is depicted in f igure 11. during the entire write cycle sdo remains in high - impedance state. figure 11 : 4 - wire basic spi write sequence (mode 11) the basic read operation waveform for 4 - wire configuration is depicted in figure 12: figure 12 : 4 - wire basic spi read sequence (mode 11) csb sck sdi r/w ad6 ad 5 ad 4 ad 3 ad 2 ad1 ad0 di5 di4 di3 di2 di1 di0 di7 di6 sdo tri - state z csb sck sdi r/w ad6 ad 5 ad 4 ad 3 ad 2 ad1 ad0 sdo do5 do4 do3 do2 do1 do0 do7 do6 tri - state
BMA222 data sheet bosch sensortec rev. 1.1 5 page 57 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. the data bits are used as follows: bit0: read/write bit. when 0, the data s di is written into the chip. when 1, the data sdo from the chip is read. bit1 - 7: address ad(6:0). bit8 - 15: when in write mode, these are the data sdi, which will be written into the address. when in read mode, these are the data sdo, which are read from the address. multiple read operations are possible by keeping csb low and continuing the data transfer. o nly the first r egister address has to be written. addresses are automatically incremented after each read access as long as csb stays active low. th e principle of multiple read is shown in figure 1 3 : figure 1 3 : spi m ultiple r ead in spi 3 - wire configuration csb (chip select low active), sck (serial clock), and sdi (serial data input and output) pins are used . the communicati on starts when the csb is pulled low by the spi master and stops when csb is pulled high. sck is also controlled by spi master. sdi is driven (when used as input of the device) at the falling edge of sck and should be captured (when used as the output of t he device) at the rising edge of sck. the protocol as such is the same in 3 - wire configuration as it is in 4 - wire configuration. the basic operation waveform (read or write access) for 3 - wire configuration is depicted in f igure 1 4 : figure 1 4 : 3 - wire basic spi read or write sequence (mode 11) start rw stop 1 0 0 0 0 0 1 0 x x x x x x x x x x x x x x x x x x x x x x x x register adress (02h) csb = 0 csb = 1 data byte data byte data register - adress 03h data register - adress 04h control byte data byte data register - adress 02h csb sck sdi rw a d 6 ad5 ad4 ad3 ad2 ad1 ad0 di5 di4 di3 di2 di1 di0 di7 di6
BMA222 data sheet bosch sensortec rev. 1.1 5 page 58 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 6.2 inter - integrated circuit (i2c) the i2c bus uses scl ( = sc x pin, serial clock) and sda (= sd x pin, serial data input and output) signal lines. both lines are connected to v ddio ext ernally via pull - up resistors so that they are pulled high when the bus is free. the i2c interface of the bma 222 is compatible with the i2c specification um10204 rev. 03 (19 june 2007), available at http://www.nxp.com . the bma 222 supports i2c standard mod e and fast mode, only 7 - bit address mode is supported. for v ddio = 1.2v to 1.8v the guaranteed voltage output levels are slightly relaxed as described in the parameter specification (table 1) . the default i2c address of the device is 000 100 0b (0x0 8). it is used if the sdo pin is pulled to gnd . the alternative address 000 1001b (0x 0 9) is selected by pulling the sdo pin to v dd io . the timing specification for i2c of the bma 222 is given in t able 7 4 : table 7 4 : i2c t iming s paramete r symbol condition min max units clock frequency f scl 400 khz scl low period t low 1.3 ? s scl high period t high 0.6 sda setup time t sudat 0.1 sda hold time t hddat 0 .0 setup time for a repeated start condition t susta 0.6 hold time for a start condition t hdsta 0.6 setup time for a stop condition t susto 0.6 time before a new transmission can start t buf 1.3
BMA222 data sheet bosch sensortec rev. 1.1 5 page 59 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. figure 1 5 shows the definition of the i2c timings given in t able 7 4 : figure 1 5 : i2c t iming d iagram the i2c protocol works as follows: start : data transmission on the bus begins with a high to low transition on the sda line while sc l is held high (start condition (s) indicated by i2c bus master). once the start signal is transfe rred by the mast er, the bus is considered busy. stop : each data transfer should be terminated by a stop signal (p) generated by mas ter. the stop condition is a low to high transition on sda line while sc l is held high. ack : each byte of data transferred must be acknowledged. it is indicated by an acknowledge bit sent by the receiver. the transmitter must release the sda line (no pull down) during the acknowledge pulse while the receiver must then pull the sda line low so that it remains stable low during the high period of the acknowledge clock cycle. in the following diagrams these abbreviations are used: s start p stop acks acknowledge by slave ackm acknowledge by master nackm not acknowledge by master rw read / write a start immediately f ollowed by a stop (without sck toggling from logic 1 to logic 0) is not supported. if such a combination occurs, the stop is not recognized by the device. t hddat t f t buf sd a sc l sd a t low t hdsta t r t susta t high t sudat t susto
BMA222 data sheet bosch sensortec rev. 1.1 5 page 60 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. i2c write access: i2c write access can be used to write a data byte in one sequence. the sequenc e begins with start condition generated by the master, followed by 7 bits s lave address and a write bit (r w = 0). the slave sends an acknowledge bit (ack = 0) and releases the bus. then the master sends the one byte register address . the slave again acknow ledge s the transmission and wait s for the 8 bits of data which shall be written to the specified register address. after the slave acknowledges the data byte, the master generates a stop signal and terminates the writing protocol . e xample of an i2c write access: figure 1 6 : i2c w rite i2c read access: i2c read access also can be used to read one or multiple data bytes in one sequence. a read sequence consists of a one - byte i2c write phase followed by the i2c read phase. the two parts of the transmission must be separated by a repeated start condition (sr). the i2c write phase addresses the slave and sends the register address to be read. after slave acknowledges the transmission, the master generates again a start condition and s ends the slave address together with a re ad bit (r w = 1). then the master releases the bus and waits for the data bytes to be read out from slave. after each data byte the master has to generate an acknowledge bit (ack = 0) to enable further data transfer. a nack m (ack = 1) from the master stops the data being transferred from the slave. the s lave releases the bus so that the master can generate a stop condition and terminate the transmission. the r egister address is automatically incremented and , therefore , more than one byte can be sequentially read out. once a new data read transmission starts, the start address will be set to the register address specified in the latest i2c write command. by default the start address is set at 0x00. in this way repetitiv e multi - bytes reads from the same starting address are possible. in order to prevent the i2c slave of the device to lock - up the i2c bus, a watchdog timer (wdt) is implement ed. the wdt observes internal i2c signals and resets the i2c interface if the bus is locked - up by the bma 222 . the activity and the timer period of the wdt can be configured through the bits (0x34) i2c_wdt_en and (0x34) i2c_wdt_sel . writing 1 (0) to (0x34) i2c_wdt_en activates (de - activates) the wdt. writing 0 (1) to (0x34) i2c_ wdt_ se selects a timer period of 1 ms (50 ms). start rw acks acks acks stop 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 x x x x x x x x s slave adress register adress (0x10) control byte data byte data (0x09) p
BMA222 data sheet bosch sensortec rev. 1.1 5 page 61 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. e xample of an i2c read access: figure 1 7 : i2c m ultiple r ead start rw acks dummy acks stop 0 0 1 1 0 0 0 0 x 0 0 0 0 0 1 0 start rw acks ackm ackm 0 0 1 1 0 0 0 1 x x x x x x x x x x x x x x x x ackm ackm x x x x x x x x x x x x x x x x ackm nack stop x x x x x x x x x x x x x x x x data byte data byte read data (0x04) read data (0x05) p data byte data byte read data (0x06) read data (0x07) s slave adress register adress (0x02) slave adress read data (0x03) read data (0x02) control byte p data byte data byte sr
BMA222 data sheet bosch sensortec rev. 1.1 5 page 62 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 7. pin - o ut and c onnection d iagram 7.1 pin - o ut figure 1 8 : pin - o ut t op v iew figur e 19 pin - o ut b ottom v iew table 7 5 : pin d escription pin# name i/o type description connect to in spi 4w in spi 3w in i2c 1 sdo digital out serial data output in spi address select in i2c mode see chapter 6.2 sdo dnc (float) gnd for default addr. 2 sdx digital i/o sda serial data i/o in i2c sdi serial data input in spi 4w sda serial data i/o in spi 3w sdi sda sda 3 vddio supply digital i/o supply voltage (1.2v 3.6v) v ddio v ddio v ddio 4 nc -- gnd gnd gnd 5 int1 digital o ut interrupt output 1 int1 int1 int1 6 int2 digital out interrupt output 2 int2 int2 int2 7 vdd supply power supply for an a l o g & digital domain (1.62v 3.6v) v dd v dd v dd 8 gnd io ground ground for i/o gnd gnd gnd 9 gnd ground ground for digital & analo g gnd gnd gnd 10 csb digital in chip sel e ct for spi mode csb csb dnc (float) 11 ps digital in protocol select (gnd = spi, v dd io = i2c, float = c - less). pin must not float unless dedicated mode is used, see chapter 4.2.2 gnd gnd v dd io 12 scx digital in sck for spi serial clock scl for i2c serial clock sck sck scl bottom view pads visible ! top view pads not visible!
BMA222 data sheet bosch sensortec rev. 1.1 5 page 63 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 7.2 connection d iagram 4 - wire spi figure 2 0 : 4 - wire spi c onnection
BMA222 data sheet bosch sensortec rev. 1.1 5 page 64 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 7.3 connection d iagram 3 - wire spi figure 2 1 : 3 - wire spi c on nection
BMA222 data sheet bosch sensortec rev. 1.1 5 page 65 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 7.4 connection d iagram i 2 c figure 2 2 : i2c c onnection note: the recommended value for c 1 , c 2 is 100 nf.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 66 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 8 . package 8.1 outline d imensions the sensor housing is a standard lga package. it is compliant with jedec standard mo - 229 type vggd - 3. its dimensions are the following. figure 2 3 : package o utline d imensions
BMA222 data sheet bosch sensortec rev. 1.1 5 page 67 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 8.2 sensing a xes o rientation if the sensor is accelerated in the indicated directions, the corresponding channel will deliver a positive accel eration signal (dynamic acceleration). if the sensor is at rest and the force of gravity is act ing along the indicated directions, the output of the corresponding channel will be negative (static acceleration). example: if the sensor is at rest or at unif orm motion in a gravity field according to the figure given below, the output signals are: ? 0g for the x channel ? 0g for the y channel ? + 1g for the z channel figure 2 4 : orientation of sensing axis the following table lists all corresponding ou tput signals on x, y , and z while the sensor is at rest or at uniform motion in a gravity field under assumption of a 2g range setting and a top down gravity vector as shown above. table 7 6 : output signals depending on sensor orientation sens or orientation (gravity vector ) output signal x 0g / 0lsb 1g / 64 lsb 0g / 0lsb - 1g / - 64 lsb 0g / 0lsb 0g / 0lsb output signal y - 1g / - 64 lsb 0g / 0lsb +1g / 64 lsb 0g / 0lsb 0g / 0lsb 0g / 0lsb output signal z 0g / 0lsb 0g / 0lsb 0g / 0lsb 0g / 0lsb 1g / 64 lsb - 1g / - 64 lsb upright u pright
BMA222 data sheet bosch sensortec rev. 1.1 5 page 68 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 8.3 landing p attern r ecommendation f or the design of the landing patterns, we recommend the following dimensioning: figur e 2 5 : landing patterns relative to the device pins, dimensions are in mm
BMA222 data sheet bosch sensortec rev. 1.1 5 page 69 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 8.4 marking 8.4.1 mass production samples table 7 7 : marking of mass production samples labeling name symbol remark lot counte r ccc 3 alphanumeric digits, variable to generate mass production trace - code product number t 1 alphanumeric digit, fixed to identify product type, t = 7 sub - con id l 1 alphanumeric digit, variable to identify sub - con (l = a or l = u or l = p) pin 1 identifier ? -- 8.4.2 engineering samples table 7 8 : marking of engineering samples labeling name symbol remark eng. sample id n 1 alphanumeric digit, fixed to identify engineering sample, n = e sample id xx 2 alphanumeric digits, variable to generate trace - code counter id cc 2 alphanumeric digits, variable to generate trace - code pin 1 identifier ? -- xxn cc ccc tl
BMA222 data sheet bosch sensortec rev. 1.1 5 page 70 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 8.5 soldering g uidelines the moisture sensitivity level of the bma 222 sensors corresponds to jedec le vel 1, see also - ipc/jedec j - std - 020c "joint industry standard: moisture/reflow sensitivity classification for n on - hermetic solid state surface mount devices" - ipc/jedec j - std - 033a "joint industry standard: handling, packing, shipping and use of moisture/ reflow sensitive surface mount devices". the sensor fulfils the lead - free soldering requirements of the above - mentioned ipc/jedec standard, i.e. reflow soldering with a peak temperature up to 260c. figure 2 6 : soldering p rofile
BMA222 data sheet bosch sensortec rev. 1.1 5 page 71 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 8.6 handling i nstruction s micromechanical sensors are designed to sense acceleration with high accuracy even at low amplitudes and contain highly sensitive structures inside the sensor element. the mems sensor can tolerate mechanical shocks up to several thousand g's. however, th ese limits might be exceeded in conditions with extreme shock loads such as e.g. hammer blow on or next to the sensor, dropping of the sensor onto hard surfaces etc. we recommend to avoid g - forces beyond the specified limits during transport, handling and mounting of the sensors in a defined and qualified installation process. this device has built - in protections against high electrostatic discharges or electric fields ( e.g. 2kv hbm); however, anti - static precautions should be taken as for any other cmos component. unless otherwise specified, proper operation can only occur when all terminal voltages are kept within the supply voltage range. unused inputs must always be tied to a defined logic voltage level. 8.7 tape and r eel s pecification the bma 222 is shipped in a standard cardboard box. the box dimension for 1 reel is: l x w x h = 35cm x 35cm x 6cm bma 222 q uantity: 10, 000pcs per reel, please handle with care. figure 2 7 : tape and r eel d imensions in mm
BMA222 data sheet bosch sensortec rev. 1.1 5 page 72 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 8.7.1 orientation within the r eel ? proces sing direction ? figure 28: orientation of the bma 222 devices relative to the tape 8.8 environmental s afety the bma 222 sensor meets the requirements of the ec restriction of hazardous substances (rohs) directive, see also: directive 2002/95/ec of the european parliament and of the council of 27 january 2003 on the restriction of the use of certain hazardous substances in electrical and electronic equipment. 8.8.1 halogen content results of chemical analysis indicate that the bma 222 contains l ess than 900ppm (by weight) of fluorine, chlorine, iodine and bromine (i.e. < 50ppm per each substance). therefore the bma 222 can be regarded as halogen - free. for more details on the analysis results please contact your bosch sensortec representative. 8.8.2 internal package structure within the scope of bosch se nsortec?s ambition to improve i t s products and secure the mass product supply, bosch sensortec qualifies additional sources (e.g. 2 nd source) for the lga package of the bma 222 . while bosch senso rtec took care that all of the technical packages parameters are described above are 100% identical for all sources, there can be differences in the chemical content and the internal structural betwee n the different package sources. however, as secured by the extensive product qualification process of bosch sensortec, this has no impact to the usage or to the quality of the bma 222 product.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 73 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 9 . legal d isclaimer 9 .1 engineering s amples engineering samples are marked with e . samples may vary from the valid technical specifications of the product series contained in this data sheet. they are therefore not intended or fit for resale to third parties or for use in end products. their sole purpose is internal client testing. the testing of an engineering sample may in no way replace the testing of a product series. bosch sensortec assumes no liability for the use of engineering samples. the purchaser shall indemnify bosch sensortec from all claims arising from the use of engineering samples. 9 . 2 product use bos ch sensortec products are developed for the consumer goods industry. they may only be used within the parameters of this product data sheet. they are not fit for use in life - sustaining or security sensitive systems. security sensitive systems are those for which a malfunction is expected to lead to bodily harm or significant property damage. in addition, they are not fit for use in products which interact with motor vehicle systems. the resale and/or use of products are at the purchaser?s own risk and his own responsibility. the examination of fitness for the intended use is the sole responsibility of the purchaser. the purchaser shall indemnify bosch sensortec from all third party claims arising from any product use not covered by the parameters of this product data sheet or not approved by bosch sensortec and reimburse bosch sensortec for all costs in connection with such claims. the purchaser must monitor the market for the purchased products, particularly with regard to product safety, and inform bosc h sensortec without delay of all security relevant incidents. 9 .3 application examples and hints with respect to any examples or hints given herein, any typical values stated herein and/or any information regarding the application of the device, bosch sen sortec hereby disclaims any and all warranties and liabilities of any kind, including without limitation warranties of non - infringement of intellectual property rights or copyrights of any third party. the information given in this document shall in no eve nt be regarded as a guarantee of conditions or characteristics. they are provided for illustrative purposes only and no evaluation regarding infringement of intellectual property rights or copyrights or regarding functionality, performance or error has bee n made.
BMA222 data sheet bosch sensortec rev. 1.1 5 page 74 / not for publishing 31 - may - 201 2 ? bosch sensortec gmbh reserves all rights even in the event of industrial property rights. we reserve all rights of disposal such as as copying and passing on to third parties. bosch and the symbol are registered trademarks of robert bosch gmbh, germany. note: specifications within this document are subject to change without notice. 10 . document history and modification rev ision chapter description of modification/c hanges date 0. 8 document release 1 7 december 2010 0.9 1 update table 1 26 january 2011 4.2.2 added missing table numbers 4.3 update table 7 4.4.1 updat e 4.6 update 1.0 5.2 update register map (reg. addr. 0x08h) 0 7 march 2011 1.05 4.8.3 typo correction, int1_od and int2_od 20 june 2011 5.11 typo correction, register 0x25 5.11 typo correction in table 53 description 1.10 5.2 typo correction re gister map 02 november 2011 1.15 4.8.5 update any - motion (slope) detection 31 may 2012 4.8.7 update orientation interrupt 6.2 update i2c address selection 8.2 update sensing axes orientation bosch sensortec gmbh gerhard - kindler - strasse 8 72770 reutlingen / germany contact@bosch - sensortec.com www.bosch - sensortec.com modifications reserved | printed in germany specifications sub ject to change without notice document number: bst - BMA222 - ds00 2 - 0 5 version_ 1.1 5 _ 05 201 2


▲Up To Search▲   

 
Price & Availability of BMA222

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X